TXMLDocumentLoadFromFile (Delphi)
Description
The following example uses the LoadFromFile function.
Code
procedure Test_LoadFromFile;
const
CFilename = 'file.xml'; { Should exist. }
var
LDocument: IXMLDocument;
begin
LDocument := TXMLDocument.Create(nil);
LDocument.LoadFromFile(CFilename);
{ Display document element local name. }
if LDocument.DocumentElement <> nil then
Writeln(LDocument.DocumentElement.LocalName);
end;
Uses
- Xml.XMLDoc.TXMLDocument.LoadFromFile ( fr | de | ja )