Methods Summary |
---|
public void | characters(char[] ch, int start, int length)Adapt a SAX2 characters event.
if (documentHandler != null)
documentHandler.characters(ch, start, length);
|
public void | endDocument()End document event.
if (documentHandler != null)
documentHandler.endDocument();
|
public void | endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)Adapt a SAX2 end element event.
if (documentHandler != null)
documentHandler.endElement(qName);
|
public void | endPrefixMapping(java.lang.String prefix)Adapt a SAX2 end prefix mapping event.
|
public void | ignorableWhitespace(char[] ch, int start, int length)Adapt a SAX2 ignorable whitespace event.
if (documentHandler != null)
documentHandler.ignorableWhitespace(ch, start, length);
|
public void | parse(org.xml.sax.InputSource input)Parse the document.
This method will throw an exception if the embedded
XMLReader does not support the
http://xml.org/sax/features/namespace-prefixes property.
setupXMLReader();
xmlReader.parse(input);
|
public void | parse(java.lang.String systemId)Parse the document.
This method will throw an exception if the embedded
XMLReader does not support the
http://xml.org/sax/features/namespace-prefixes property.
parse(new InputSource(systemId));
|
public void | processingInstruction(java.lang.String target, java.lang.String data)Adapt a SAX2 processing instruction event.
if (documentHandler != null)
documentHandler.processingInstruction(target, data);
|
public void | setDTDHandler(org.xml.sax.DTDHandler handler)Register the DTD event handler.
xmlReader.setDTDHandler(handler);
|
public void | setDocumentHandler(org.xml.sax.DocumentHandler handler)Register the SAX1 document event handler.
Note that the SAX1 document handler has no Namespace
support.
documentHandler = handler;
|
public void | setDocumentLocator(org.xml.sax.Locator locator)Set a document locator.
if (documentHandler != null)
documentHandler.setDocumentLocator(locator);
|
public void | setEntityResolver(org.xml.sax.EntityResolver resolver)Register the entity resolver.
xmlReader.setEntityResolver(resolver);
|
public void | setErrorHandler(org.xml.sax.ErrorHandler handler)Register the error event handler.
xmlReader.setErrorHandler(handler);
|
public void | setLocale(java.util.Locale locale)Set the locale for error reporting.
This is not supported in SAX2, and will always throw
an exception.
throw new SAXNotSupportedException("setLocale not supported");
|
private void | setup(org.xml.sax.XMLReader xmlReader)Internal setup.
if (xmlReader == null) {
throw new NullPointerException("XMLReader must not be null");
}
this.xmlReader = xmlReader;
qAtts = new AttributesAdapter();
|
private void | setupXMLReader()Set up the XML reader.
xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
try {
xmlReader.setFeature("http://xml.org/sax/features/namespaces",
false);
} catch (SAXException e) {
// NO OP: it's just extra information, and we can ignore it
}
xmlReader.setContentHandler(this);
|
public void | skippedEntity(java.lang.String name)Adapt a SAX2 skipped entity event.
|
public void | startDocument()Start document event.
if (documentHandler != null)
documentHandler.startDocument();
|
public void | startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)Adapt a SAX2 start element event.
if (documentHandler != null) {
qAtts.setAttributes(atts);
documentHandler.startElement(qName, qAtts);
}
|
public void | startPrefixMapping(java.lang.String prefix, java.lang.String uri)Adapt a SAX2 start prefix mapping event.
|