|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.xineo.xml.handler.Parser
This class is available as a convenience way to parse XML content using object handlers. It just installs the given object handler as a content handler for an XML reader (which may either be newly instanciated, or given as a parameter).
XMLReader,
ObjectHandler,
RootHandler| Constructor Summary | |
Parser(ObjectHandler rootHandler)
Creates a new parser, given the root object handler. |
|
Parser(org.xml.sax.XMLReader xmlReader,
ObjectHandler rootHandler)
Creates a new parser, given the root object handler. |
|
| Method Summary | |
ObjectHandler |
getRootHandler()
Returns the root object handler that will be used to handle the root elements of parsed documents. |
org.xml.sax.XMLReader |
getXMLReader()
Returns the XML reader that will be used to parse XML documents. |
void |
parse(org.xml.sax.InputSource inputSource)
Parses an XML document given by an input source. |
void |
parse(java.lang.String systemId)
Parses an XML document given by a system identifier. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Parser(ObjectHandler rootHandler)
throws org.xml.sax.SAXException
rootHandler - Root handler (handler for the root element of parsed documents).
org.xml.sax.SAXException - May be thrown by the XML reader factory.XMLReader,
XMLReaderFactory
public Parser(org.xml.sax.XMLReader xmlReader,
ObjectHandler rootHandler)
xmlReader - XML reader to be used to parse XML documents.rootHandler - Root handler (handler for the root element of parsed documents).XMLReader| Method Detail |
public org.xml.sax.XMLReader getXMLReader()
public ObjectHandler getRootHandler()
public void parse(org.xml.sax.InputSource inputSource)
throws java.io.IOException,
org.xml.sax.SAXException
inputSource - The input source to be read.
java.io.IOException - I/O exception.
org.xml.sax.SAXException - SAX exception. May embed a HandlerException.XMLReader.parse(org.xml.sax.InputSource)
public void parse(java.lang.String systemId)
throws java.io.IOException,
org.xml.sax.SAXException
systemId - System identifier of the document to be parsed.
java.io.IOException - I/O exception.
org.xml.sax.SAXException - SAX exception. May embed a HandlerException.XMLReader.parse(java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||