public class XMLTokenizer extends DefaultXMLDocumentHandler
| Constructor and Description |
|---|
XMLTokenizer()
Creates a new Tokenizer object.
|
XMLTokenizer(XMLToken handler)
Creates a new Tokenizer object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
parseDocument()
Parses an XML Document
|
void |
setErrorHandler(ErrorHandler handler)
Applications can use this to register a new error event handler.
|
void |
setErrorStream(java.io.OutputStream out)
Register a output stream for errors
|
void |
setToken(int token, boolean val)
Applications can use this to register a new token for XML tokenizer.
|
void |
setTokenHandler(XMLToken handler)
Applications can use this to register a new XML tokenizer event handler.
|
void |
tokenize(InputSource in)
Tokenizes the XML from given input source
|
void |
tokenize(java.io.InputStream in)
Tokenizes the XML from given input stream.
|
void |
tokenize(java.io.Reader r)
Tokenizes the XML from given input stream.
|
void |
tokenize(java.lang.String in)
Tokenizes the XML from the URL indicated
|
void |
tokenize(java.net.URL url)
Tokenizes the XML document pointed to by the given URL and creates the corresponding XML document hierarchy.
|
cDATASection, comment, endDoctype, endElement, endElement, endPrefixMapping, getHandler, setDoctype, setError, setHandler, setTextDecl, setXMLDecl, setXMLSchema, skippedEntity, startElement, startElement, startPrefixMappingcharacters, endDocument, endElement, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, startDocument, startElement, unparsedEntityDecl, warningequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcharacters, endDocument, endElement, ignorableWhitespace, processingInstruction, setDocumentLocator, startDocument, startElementpublic XMLTokenizer()
public XMLTokenizer(XMLToken handler)
public void setErrorStream(java.io.OutputStream out)
public void setErrorHandler(ErrorHandler handler)
handler - ErrorHandler being registered
public final void tokenize(java.net.URL url)
throws XMLParseException,
SAXException,
java.io.IOException
url - the url points to the XML document to parse.XMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.public final void tokenize(InputSource in) throws XMLParseException, SAXException, java.io.IOException
in - the org.xml.sax.InputSouce to parseXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void tokenize(java.lang.String in)
throws XMLParseException,
SAXException,
java.io.IOException
in - the String containing the URL to parse fromXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void tokenize(java.io.InputStream in)
throws XMLParseException,
SAXException,
java.io.IOException
in - the InputStream containing XML data to parse.XMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.XMLParser.setBaseURL(java.net.URL)
public final void tokenize(java.io.Reader r)
throws XMLParseException,
SAXException,
java.io.IOException
r - the Reader containing XML data to parse.XMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.XMLParser.setBaseURL(java.net.URL)public void setTokenHandler(XMLToken handler)
handler - XMLToken being registered
public void setToken(int token,
boolean val)
token - XMLToken being set
public void parseDocument()
throws SAXException,
java.io.IOException
SAXException - Any SAX Exception, possibly wrapping another exception.java.io.IOException - IO Error.