Hi,
I am serializing an entitiy collection to Xml,
If MaintExpHouse.ContainsDirtyContents Then
Dim writer As New StreamWriter("MainExpHouse.XML")
Dim customerXml As String = String.Empty
MaintExpHouse.WriteXml( _
XmlFormatAspect.Compact Or XmlFormatAspect.DatesInXmlDataType Or XmlFormatAspect.MLTextInCDataBlocks, customerXml)
writer.Write(customerXml)
writer.Close()
End If
The entity been written is a matrix of 200 rows x 8 columns. This never grows in length only the content is edited.
The initial produced Xml file is about 300kb.
After a few more saves, the Xml file in a short time raplidy grows. One test I done was, after 10 saves this file was now 22mb.
What appears to be appended to the end of the XML file is these lines
<ProcessedObjectReference ObjectID="59c82c3b-4e72-459e-8fe2-c7085ff6b949" />
Is there a way to prevent this rapid growth ? or suppress these line being written to the file.
Again the matrix is not growing in size between these saves.
PS I am using this code to read the Xml back into the entity.
Dim reader As New StreamReader("MaintInternal.XML")
Dim xmlFromFile As String = reader.ReadToEnd()
reader.Close()
Me.MaintInternal.ReadXml(xmlFromFile)
Me.dgMaint.DataSource = MaintInternal
Thanks,
Sean