public class DefaultHandler extends java.lang.Object implements ContentHandler, ErrorHandler
| Constructor and Description |
|---|
DefaultHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Receives notification of character data.
|
void |
endDocument()
Receives notification of the end of a document.
|
void |
endElement(CharArray namespaceURI,
CharArray localName,
CharArray qName)
Receives notification of the end of an element.
|
void |
endPrefixMapping(CharArray prefix)
Ends the scope of a prefix-URI mapping.
|
void |
error(SAXParseException e)
Receives notification of recoverable parser error.
|
void |
fatalError(SAXParseException e)
Reports a fatal XML parsing error.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Receives notification of ignorable whitespace in element content.
|
void |
processingInstruction(CharArray target,
CharArray data)
Receives notification of a processing instruction.
|
void |
setDocumentLocator(Locator locator)
Receives an object for locating the origin of SAX document events.
|
void |
skippedEntity(CharArray name)
Receives notification of a skipped entity.
|
void |
startDocument()
Receives notification of the beginning of a document.
|
void |
startElement(CharArray namespaceURI,
CharArray localName,
CharArray qName,
Attributes atts)
Receives notification of the beginning of an element.
|
protected static void |
startElement(CharArray uri,
CharArray localName,
CharArray qName,
Attributes atts)
Generates compile-time error if
startElement is not
correctly overriden. |
void |
startPrefixMapping(CharArray prefix,
CharArray uri)
Begins the scope of a prefix-URI Namespace mapping.
|
void |
warning(SAXParseException e)
Receives notification of a warning.
|
public void warning(SAXParseException e) throws SAXException
warning in interface ErrorHandlere - the warning information encapsulated in a SAX parse exception.SAXException - any SAX exception.SAXParseExceptionpublic void error(SAXParseException e) throws SAXException
error in interface ErrorHandlere - the error information encapsulated in a SAX parse exception.SAXException - any SAX exception.SAXParseExceptionpublic void fatalError(SAXParseException e) throws SAXException
fatalError in interface ErrorHandlere - the error information encapsulated in a SAX parse exception.SAXException - any SAX exception.SAXParseExceptionpublic void setDocumentLocator(Locator locator)
ContentHandlersetDocumentLocator in interface ContentHandlerlocator - the document locator.public void startDocument()
throws SAXException
ContentHandlerstartDocument in interface ContentHandlerSAXException - any SAX exception.public void endDocument()
throws SAXException
ContentHandlerendDocument in interface ContentHandlerSAXException - any SAX exception.public void startPrefixMapping(CharArray prefix, CharArray uri) throws SAXException
ContentHandlerstartPrefixMapping in interface ContentHandlerprefix - the Namespace prefix being declared.uri - the namespace URI the prefix is mapped to.SAXException - any SAX exception.public void endPrefixMapping(CharArray prefix) throws SAXException
ContentHandlerendPrefixMapping in interface ContentHandlerprefix - the prefix that was being mapping.SAXException - any SAX exception.public void startElement(CharArray namespaceURI, CharArray localName, CharArray qName, Attributes atts) throws SAXException
ContentHandlerstartElement in interface ContentHandlernamespaceURI - the namespace URI, or an empty character sequence if the
element has no Namespace URI or if namespace processing is not
being performed.localName - the local name (without prefix), or an empty character
sequence if namespace processing is not being performed.qName - the qualified name (with prefix), or an empty character
sequence if qualified names are not available.atts - the attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.SAXException - any SAX exception.public void endElement(CharArray namespaceURI, CharArray localName, CharArray qName) throws SAXException
ContentHandlerendElement in interface ContentHandlernamespaceURI - the namespace URI, or an empty character sequence if the
element has no Namespace URI or if namespace processing is not
being performed.localName - the local name (without prefix), or an empty character
sequence if namespace processing is not being performed.qName - the qualified XML 1.0 name (with prefix), or an empty
character sequence if qualified names are not available.SAXException - any SAX exception.public void characters(char[] ch,
int start,
int length)
throws SAXException
ContentHandlercharacters in interface ContentHandlerch - the characters from the XML document.start - the start position in the array.length - the number of characters to read from the array.SAXException - any SAX exception.public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ContentHandlerignorableWhitespace in interface ContentHandlerch - the characters from the XML document.start - the start position in the array.length - the number of characters to read from the array.SAXException - any SAX exception.public void processingInstruction(CharArray target, CharArray data) throws SAXException
ContentHandlerprocessingInstruction in interface ContentHandlertarget - the processing instruction target.data - the processing instruction data, or null if
none was supplied. The data does not include any
whitespace separating it from the target.SAXException - any SAX exception.public void skippedEntity(CharArray name) throws SAXException
ContentHandlerskippedEntity in interface ContentHandlername - the name of the skipped entity. If it is a
parameter entity, the name will begin with '%', and if
it is the external DTD subset, it will be the character sequence
"[dtd]".SAXException - any SAX exception.protected static final void startElement(CharArray uri, CharArray localName, CharArray qName, Attributes atts) throws SAXException
startElement is not
correctly overriden. This method generates a compile-error
"final method cannot be overridden" if
org.xml.sax.Attributes is used instead of
javolution.xml.sax.Attributes (common mistake).uri - the namespace URI, or an empty character sequence if the
element has no Namespace URI or if namespace processing is not
being performed.localName - the local name (without prefix), or an empty character
sequence if namespace processing is not being performed.qName - the qualified name (with prefix), or an empty character
sequence if qualified names are not available.atts - the attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.SAXException - any SAX exception.startElement to staticCopyright © 2005 - 2007 Javolution.