public class ParsingContentHandler extends DefaultContentHandler
ContentHandler
instance with
simple XML parsing capability.Constructor and Description |
---|
ParsingContentHandler(org.xml.sax.ContentHandler handler)
Creates a
DefaultHandler adapter for the given content
handler. |
Modifier and Type | Method and Description |
---|---|
void |
parse(java.io.InputStream in)
Utility method that parses the given input stream using this handler.
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Returns an empty stream to prevent the XML parser from attempting
to resolve external entity references.
|
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
public ParsingContentHandler(org.xml.sax.ContentHandler handler)
DefaultHandler
adapter for the given content
handler.handler
- content handlerpublic void parse(java.io.InputStream in) throws java.io.IOException, org.xml.sax.SAXException
in
- XML input streamjava.io.IOException
- if an I/O error occursorg.xml.sax.SAXException
- if an XML parsing error occurspublic org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
resolveEntity
in interface org.xml.sax.EntityResolver
resolveEntity
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
Copyright © 2010 - 2020 Adobe. All Rights Reserved