TXMLDocument will remove entities like 

87 views Asked by At

I am using TXMLDocument to process a PAD file at http://repository.appvisor.com/info/app-9f00e7003a57/DataNumen_Access_Repair_pad.xml

Below is my code(XML Vendor is MSXML):

procedure ProcessFile1(const SrcFileName: string);
var
  XmlFile: IXMLDocument;
begin
  XmlFile := TXMLDocument.Create(nil);
  try
    XmlFile.LoadFromFile(SrcFileName);
    XmlFile.SaveToFile(SrcFileName)
  finally
  end;
end;

My codes just load the file and then save it. The saved version is at https://www.datanumen.com/temp/pad/DataNumen_Access_Repair_pad1.xml

I use WinMerge to compare the two versions, and find the entities are all deleted in the saved version.

enter image description here

How to prevent this?

0

There are 0 answers