TXMLDocumentNode (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example uses the Node property.

Code

procedure Test_Node;
var
  LDocument: IXMLDocument;
begin
  LDocument := TXMLDocument.Create(nil);
  LDocument.Active := True;
  LDocument.DocumentElement := LDocument.CreateElement('Automotive', EmptyStr);

  { Document node is not the document element. }
  Writeln(LDocument.Node.NodeName);
  Writeln(LDocument.DocumentElement.NodeName);
end;

Uses