i tried load XML document and save an exact copy. Problem is all line feed symbol (#10, hex 0A) are replaced with carriage return. (#13#10, hex 0D0A)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- Information -->
<AddInsList>
<AddInItem ID="name1">
<Title DefaultText="Some text">
<tag1><![CDATA[Some text]]></tag1>
</Title>
<Description DefaultText="some informations">
<tag1><![CDATA[**Some text with line feed symbols 0A**]]></tag1>
</Description>
</AddInItem>
</AddInsList>
my code:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, XMLIntf, XMLDoc, ActiveX, xmldom, StdCtrls, ComCtrls;
var
Doc : IXMLDocument;
Begin
Doc:=NewXMLDocument;
//Prevent to change white spaces to tabulators
Doc.ParseOptions := Doc.ParseOptions+[poValidateOnParse]+[poPreserveWhiteSpace];
Doc.LoadFromFile('C:\test.xml');
Doc.SaveToFile('C:\exact.xml');
End;