public class XMLMultiHandler extends java.lang.Object implements ContentHandler
Constructor and Description |
---|
XMLMultiHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addContentHandler(ContentHandler cntHandler)
Add the next level ContentHandler the order in which the handler are called is not defined.
|
void |
characters(char[] ch, int start, int length)
Receive notification of character data.
|
void |
endDocument()
Receive notification of the end of a document.
|
void |
endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
Receive notification of the end of an element.
|
void |
endPrefixMapping(java.lang.String prefix)
End the scope of a prefix-URI mapping.
|
ContentHandler[] |
getContentHandlers()
Return the next level of ContentHandlers
|
int |
getNumContentHandlers()
Return the number of ContentHandlers
|
void |
ignorableWhitespace(char[] ch, int start, int length)
Receive notification of ignorable whitespace in element content.
|
void |
processingInstruction(java.lang.String target, java.lang.String data)
Receive notification of a processing instruction.
|
boolean |
removeContentHandler(ContentHandler cntHandler)
Remove a content handler
|
void |
setDocumentLocator(Locator locator)
Receive an object for locating the origin of SAX document events.
|
void |
skippedEntity(java.lang.String name)
Receive notification of a skipped entity.
|
void |
startDocument()
Receive notification of the beginning of a document.
|
void |
startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts)
Receive notification of the beginning of an element.
|
void |
startPrefixMapping(java.lang.String prefix, java.lang.String uri)
Begin the scope of a prefix-URI Namespace mapping.
|
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
locator
- An object that can return the location of any SAX document event.Locator
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
- Any SAX exception, possibly wrapping another exception.endDocument()
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
- Any SAX exception, possibly wrapping another exception.startDocument()
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
prefix
- The Namespace prefix being declared.uri
- The Namespace URI the prefix is mapped to.SAXException
- The client may throw an exception during processing.endPrefixMapping(java.lang.String)
, startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endPrefixMapping(java.lang.String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
prefix
- The prefix that was being mapping.SAXException
- The client may throw an exception during processing.startPrefixMapping(java.lang.String, java.lang.String)
, endElement(java.lang.String, java.lang.String, java.lang.String)
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
uri
- The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.localName
- The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- The qualified name (with prefix), or the empty string 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, possibly wrapping another exception.endElement(java.lang.String, java.lang.String, java.lang.String)
, Attributes
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws SAXException
endElement
in interface ContentHandler
uri
- The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.localName
- The local name (without prefix), or the empty string if Namespace processing is not being performed.qName
- The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.SAXException
- Any SAX exception, possibly wrapping another exception.public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
ch
- 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, possibly wrapping another exception.ignorableWhitespace(char[], int, int)
, Locator
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
ch
- 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, possibly wrapping another exception.characters(char[], int, int)
public void processingInstruction(java.lang.String target, java.lang.String data) throws SAXException
processingInstruction
in interface ContentHandler
target
- 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, possibly wrapping another exception.public void skippedEntity(java.lang.String name) throws SAXException
skippedEntity
in interface ContentHandler
name
- 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 string "[dtd]".SAXException
- Any SAX exception, possibly wrapping another exception.public void addContentHandler(ContentHandler cntHandler)
ContentHandler
-public ContentHandler[] getContentHandlers()
public int getNumContentHandlers()
public boolean removeContentHandler(ContentHandler cntHandler)
cntHandler
- content handler to be removed