public class SAXHandler
extends org.xml.sax.helpers.DefaultHandler
| Modifier and Type | Field and Description |
|---|---|
protected org.xml.sax.Locator |
locator
Locator of the handler.
|
| Constructor and Description |
|---|
SAXHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected org.xml.sax.SAXException |
buildSAXException(java.lang.String message)
Builds a SAXException with a given message text.
|
protected void |
checkVersion(org.xml.sax.Attributes attrs,
java.lang.String since)
Tests if the indicated "version" number in an XML document is still
supported.
|
protected void |
reportError(java.lang.String message)
Deprecated.
Use
buildSAXException(String) and throw the
exception yourself. |
void |
setDocumentLocator(org.xml.sax.Locator locator) |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warningpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandlerprotected void checkVersion(org.xml.sax.Attributes attrs,
java.lang.String since)
throws org.xml.sax.SAXException
attrs - The list of XML attributes of a document's root element.since - The smallest version number that can be accepted, or
null if all known versions are accepted.org.xml.sax.SAXException - If no "version" attribute exists, or if the
indicated version is not known or no longer accepted.java.lang.IllegalArgumentException - If the "since" version is not known.@Deprecated
protected void reportError(java.lang.String message)
throws org.xml.sax.SAXException
buildSAXException(String) and throw the
exception yourself.message - Message of the SAXExceptionorg.xml.sax.SAXException - To report the error to the SAX error handler.protected org.xml.sax.SAXException buildSAXException(java.lang.String message)
message - Message of the SAXException