TXMLDocumentCreateElement (Delphi)
Description
This example uses the CreateElement function.
Code
procedure Test_CreateElement;
var
LDocument: IXMLDocument;
LNode: IXMLNode;
begin
LDocument := TXMLDocument.Create(nil);
LDocument.Active := True;
LNode := LDocument.CreateElement('TestElement', '');
LDocument.DocumentElement := LNode;
{ Display document content. }
Writeln(LDocument.XML.Text);
end;
Uses
- Xml.XMLDoc.TXMLDocument.Active ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.CreateElement ( fr | de | ja )
- Xml.XMLDoc.TXMLDocument.XML ( fr | de | ja )