public class XmlSourceSaxHandler extends DefaultHandler
Constructor and Description |
---|
XmlSourceSaxHandler(EntityReferences entityReferences)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String localName,
String qName) |
void |
error(SAXParseException exception) |
void |
fatalError(SAXParseException exception) |
SourceElement |
getRoot()
Returns the root element of the tree.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
InputSource |
resolveEntity(String publicId,
String systemId)
EntityResolver implementation.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes) |
void |
warning(SAXParseException exception) |
endDocument, endPrefixMapping, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
public XmlSourceSaxHandler(EntityReferences entityReferences)
entityReferences
- the known entity references, not null.public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class DefaultHandler
SAXException
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
resolveEntity
in interface EntityResolver
resolveEntity
in class DefaultHandler
publicId
- The public identifier of the external entity.systemId
- The system identifier of the external entity.SAXException
IOException
ConfigurationEntityResolver.resolveEntity(String, String)
public SourceElement getRoot()
public void error(SAXParseException exception) throws SAXParseException
error
in interface ErrorHandler
error
in class DefaultHandler
SAXParseException
public void fatalError(SAXParseException exception) throws SAXParseException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXParseException
public void warning(SAXParseException exception) throws SAXParseException
warning
in interface ErrorHandler
warning
in class DefaultHandler
SAXParseException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.