| java.lang.Object org.xml.sax.helpers.XMLReaderAdapter
XMLReaderAdapter | public class XMLReaderAdapter implements Parser,ContentHandler(Code) | | Adapt a SAX2 XMLReader as a SAX1 Parser.
This module, both source code and documentation, is in the
Public Domain, and comes with NO WARRANTY.
See http://www.saxproject.org
for further information.
This class wraps a SAX2
org.xml.sax.XMLReader XMLReader and makes it act as a SAX1
org.xml.sax.Parser Parser . The XMLReader
must support a true value for the
http://xml.org/sax/features/namespace-prefixes property or parsing will fail
with a
org.xml.sax.SAXException SAXException ; if the XMLReader
supports a false value for the http://xml.org/sax/features/namespaces
property, that will also be used to improve efficiency.
since: SAX 2.0 author: David Megginson version: 2.0.1 (sax2r2) See Also: org.xml.sax.Parser See Also: org.xml.sax.XMLReader |
Inner Class :final class AttributesAdapter implements AttributeList | |
Method Summary | |
public void | characters(char ch, int start, int length) Adapt a SAX2 characters event. | public void | endDocument() End document event. | public void | endElement(String uri, String localName, String qName) Adapt a SAX2 end element event. | public void | endPrefixMapping(String prefix) Adapt a SAX2 end prefix mapping event. | public void | ignorableWhitespace(char ch, int start, int length) Adapt a SAX2 ignorable whitespace event. | public void | parse(String systemId) Parse the document. | public void | parse(InputSource input) Parse the document. | public void | processingInstruction(String target, String data) Adapt a SAX2 processing instruction event. | public void | setDTDHandler(DTDHandler handler) Register the DTD event handler. | public void | setDocumentHandler(DocumentHandler handler) Register the SAX1 document event handler. | public void | setDocumentLocator(Locator locator) Set a document locator. | public void | setEntityResolver(EntityResolver resolver) Register the entity resolver. | public void | setErrorHandler(ErrorHandler handler) Register the error event handler. | public void | setLocale(Locale locale) Set the locale for error reporting. | public void | skippedEntity(String name) Adapt a SAX2 skipped entity event. | public void | startDocument() Start document event. | public void | startElement(String uri, String localName, String qName, Attributes atts) Adapt a SAX2 start element event. | public void | startPrefixMapping(String prefix, String uri) Adapt a SAX2 start prefix mapping event. |
qAtts | AttributesAdapter qAtts(Code) | | |
XMLReaderAdapter | public XMLReaderAdapter() throws SAXException(Code) | | Create a new adapter.
Use the "org.xml.sax.driver" property to locate the SAX2
driver to embed.
exception: org.xml.sax.SAXException - If the embedded drivercannot be instantiated or if theorg.xml.sax.driver property is not specified. |
XMLReaderAdapter | public XMLReaderAdapter(XMLReader xmlReader)(Code) | | Create a new adapter.
Create a new adapter, wrapped around a SAX2 XMLReader.
The adapter will make the XMLReader act like a SAX1
Parser.
Parameters: xmlReader - The SAX2 XMLReader to wrap. exception: java.lang.NullPointerException - If the argument is null. |
characters | public void characters(char ch, int start, int length) throws SAXException(Code) | | Adapt a SAX2 characters event.
Parameters: ch - An array of characters. Parameters: start - The starting position in the array. Parameters: length - The number of characters to use. exception: org.xml.sax.SAXException - The client may raise aprocessing exception. See Also: org.xml.sax.ContentHandler.characters |
|
|