TXMLDocumentLoadFromXML (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following example uses the LoadFromXML function.

Code

procedure Test_LoadFromXML;
var
  LDocument: IXMLDocument;
begin
  LDocument := TXMLDocument.Create(nil);
  LDocument.LoadFromXML('<TestElement>Inner text.</TestElement>');

  { Should display 'TestElement'. }
  Writeln(LDocument.DocumentElement.LocalName);
end;

Uses