|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.xml.AbstractParser | +--com.caucho.xml.XmlParser | +--com.caucho.xml.Xml
XML parser interface. The parser can parse directly into the DOM or it can be used as a SAX parser.
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");
Constructor Summary | |
Xml()
Create a new strict XML parser |
Method Summary | |
static Xml |
create()
Creates an Xml parser. |
static CauchoDocument |
createDocument()
Create a new DOM document |
static DOMImplementation |
createDOMImplementation()
Create a new DOM implementation |
void |
free()
Frees an Xml parser. |
void |
init()
Initialize the parser. |
Methods inherited from class com.caucho.xml.XmlParser |
getColumnNumber, getFilename, getLine, getLineNumber, getPublicId, getSystemId, setLine, setReader, unread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Xml()
Method Detail |
public void init()
public static Xml create()
public void free()
free
in class XmlParser
public static CauchoDocument createDocument()
public static DOMImplementation createDOMImplementation()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |