TXMLDocumentSaveToXML (Delphi)
Description
The following example uses the SaveToXML function.
Code
procedure Test_SaveToXML;
const
CFilename = 'file.xml'; { Should exist. }
var
LDocument: IXMLDocument;
LContent: DOMString;
begin
LDocument := TXMLDocument.Create(nil);
LDocument.LoadFromFile(CFilename);
{ Save content to DOM string and display the string. }
LDocument.SaveToXML(LContent);
Writeln(LContent);
end;
Uses
- Xml.XMLDoc.TXMLDocument.LoadFromFile ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.SaveToXML ( fr | de | ja )