To parse a file into a DOM Document use
Document doc = new Xml().parseDocument("foo.xml");
To parse a string into a DOM Document use
String xml = "<top>small test</top>"; Document doc = new Xml().parseDocumentString(xml);
To parse a file using the SAX API use
Xml xml = new Xml(); xml.setContentHandler(myContentHandler); xml.parse("foo.xml");
|
|
|
|