TXMLDocumentSaveToFile (Delphi)
Description
The following example uses the SaveToFile function.
Code
procedure Test_SaveToFile;
const
CFilename = 'file.xml';
var
LDocument: IXMLDocument;
LNode: IXMLNode;
begin
LDocument := TXMLDocument.Create(nil);
LDocument.Active := True;
{ Define document content. }
LNode := LDocument.CreateNode('TestElement');
LDocument.DocumentElement := LNode;
LDocument.SaveToFile(CFilename);
end;
Uses
- Xml.XMLDoc.TXMLDocument.Active ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.CreateNode ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.SaveToFile ( fr | de | ja )