Version 0.9  What is XML4Ada95?  Installation  How-To  API  Download 

COUNTER
counter


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

design shareright © 2002 Phlash  
inhalt © 2003-04 Zdenko Denny Vrandecic  
last update: 14.01.2004 website created by XML4Ada95 DocGen