public class ContentHandlerAdaptor
extends java.lang.Object
implements org.xml.sax.DocumentHandler
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
ContentHandlerAdaptor.AttributeListAdapter
Adapt a SAX1 AttributeList as a SAX2 Attributes object.
|
| Modifier and Type | Field and Description |
|---|---|
private ContentHandlerAdaptor.AttributeListAdapter |
attAdapter |
private org.xml.sax.helpers.AttributesImpl |
atts |
private org.xml.sax.ContentHandler |
contentHandler |
private java.lang.String[] |
nameParts |
private boolean |
namespaces |
private org.xml.sax.helpers.NamespaceSupport |
nsSupport |
private boolean |
prefixes |
| Constructor and Description |
|---|
ContentHandlerAdaptor(org.xml.sax.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(java.lang.String qName)
Adapt a SAX1 end element event.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Adapt a SAX1 ignorable whitespace event.
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Adapt a SAX1 processing instruction event.
|
private java.lang.String[] |
processName(java.lang.String qName,
boolean isAttribute) |
(package private) void |
reportError(java.lang.String message)
Report a non-fatal error.
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
Adapt a SAX1 document locator event.
|
void |
startDocument()
Adapt a SAX1 start document event.
|
void |
startElement(java.lang.String qName,
org.xml.sax.AttributeList qAtts)
Adapt a SAX1 startElement event.
|
private final org.xml.sax.helpers.NamespaceSupport nsSupport
private final org.xml.sax.ContentHandler contentHandler
private final ContentHandlerAdaptor.AttributeListAdapter attAdapter
private final org.xml.sax.helpers.AttributesImpl atts
private final boolean namespaces
private final boolean prefixes
private final java.lang.String[] nameParts
public ContentHandlerAdaptor(org.xml.sax.ContentHandler handler)
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.DocumentHandlerlocator - A document locator.ContentHandler.setDocumentLocator(org.xml.sax.Locator)public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.DocumentHandlerorg.xml.sax.SAXException - The client may raise a
processing exception.DocumentHandler.startDocument()public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.DocumentHandlerorg.xml.sax.SAXException - The client may raise a
processing exception.DocumentHandler.endDocument()public void startElement(java.lang.String qName,
org.xml.sax.AttributeList qAtts)
throws org.xml.sax.SAXException
If necessary, perform Namespace processing.
startElement in interface org.xml.sax.DocumentHandlerqName - The qualified (prefixed) name.qAtts - The XML 1.0 attribute list (with qnames).org.xml.sax.SAXExceptionpublic void endElement(java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.DocumentHandlerqName - The qualified (prefixed) name.org.xml.sax.SAXException - The client may raise a
processing exception.DocumentHandler.endElement(java.lang.String)public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.DocumentHandlerch - An array of characters.start - The starting position in the array.length - The number of characters to use.org.xml.sax.SAXException - The client may raise a
processing exception.DocumentHandler.characters(char[], int, int)public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.DocumentHandlerch - An array of characters.start - The starting position in the array.length - The number of characters to use.org.xml.sax.SAXException - The client may raise a
processing exception.DocumentHandler.ignorableWhitespace(char[], int, int)public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.DocumentHandlertarget - The processing instruction target.data - The remainder of the processing instructionorg.xml.sax.SAXException - The client may raise a
processing exception.DocumentHandler.processingInstruction(java.lang.String, java.lang.String)private java.lang.String[] processName(java.lang.String qName,
boolean isAttribute)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionvoid reportError(java.lang.String message)
throws org.xml.sax.SAXException
message - The error message.org.xml.sax.SAXException - The client may throw
an exception.