public class ContentHandlerAdaptor extends Object implements DocumentHandler
Constructor and Description |
---|
ContentHandlerAdaptor(ContentHandler handler) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Adapt a SAX1 characters event.
|
void |
endDocument()
Adapt a SAX1 end document event.
|
void |
endElement(String qName)
Adapt a SAX1 end element event.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Adapt a SAX1 ignorable whitespace event.
|
void |
processingInstruction(String target,
String data)
Adapt a SAX1 processing instruction event.
|
void |
setDocumentLocator(Locator locator)
Adapt a SAX1 document locator event.
|
void |
startDocument()
Adapt a SAX1 start document event.
|
void |
startElement(String qName,
AttributeList qAtts)
Adapt a SAX1 startElement event.
|
public ContentHandlerAdaptor(ContentHandler handler)
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface DocumentHandler
locator
- A document locator.ContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void startDocument() throws SAXException
startDocument
in interface DocumentHandler
SAXException
- The client may raise a
processing exception.DocumentHandler.startDocument()
public void endDocument() throws SAXException
endDocument
in interface DocumentHandler
SAXException
- The client may raise a
processing exception.DocumentHandler.endDocument()
public void startElement(String qName, AttributeList qAtts) throws SAXException
If necessary, perform Namespace processing.
startElement
in interface DocumentHandler
qName
- The qualified (prefixed) name.qAtts
- The XML 1.0 attribute list (with qnames).SAXException
public void endElement(String qName) throws SAXException
endElement
in interface DocumentHandler
qName
- The qualified (prefixed) name.SAXException
- The client may raise a
processing exception.DocumentHandler.endElement(java.lang.String)
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface DocumentHandler
ch
- An array of characters.start
- The starting position in the array.length
- The number of characters to use.SAXException
- The client may raise a
processing exception.DocumentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface DocumentHandler
ch
- An array of characters.start
- The starting position in the array.length
- The number of characters to use.SAXException
- The client may raise a
processing exception.DocumentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface DocumentHandler
target
- The processing instruction target.data
- The remainder of the processing instructionSAXException
- The client may raise a
processing exception.DocumentHandler.processingInstruction(java.lang.String, java.lang.String)
Copyright © 2016 Oracle Corporation. All rights reserved.