How to parse an XML-document
The following, documented code snippet loads the XML-document test1.xml into a DOM-Tree, and closes the terminates the package correctly afterwards.
procedure Read is
Reader : DOMParser;
Doc : DOMDocument;
begin
Util.Initialize;
Reader := ImplementationLS.CreateDOMParser(ImplementationLS.Fetch);
Doc := Parser.ParseURI(Reader, From_Standard_String("test1.xml"));
-- here you can do with the doc whatever you like
Parser.Free(Reader);
Util.Finalize;
end Read;
... parse a document
... validate a document
... get informations
e-Mail: denny@nodix.de
|