References Deprecated
Parser is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
This class wraps a SAX2 XMLReader
and makes it act as a SAX1 Parser. The XMLReader
must support a true value for the
http://xml.org/sax/features/namespace-prefixes property or parsing will fail
with a 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.
org.xml.sax.Parser , org.xml.sax.XMLReader
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | XMLReaderAdapter.
References Deprecated
Internal class to wrap a SAX2 Attributes object for SAX1.
AttributeList is deprecated or references (maybe indirectly) at least one deprecated element.
|
| Modifier and Type | Field and Description |
|---|---|
| pack-priv DocumentHandler | documentHandler
References Deprecated
DocumentHandler is deprecated or references (maybe indirectly) at least one deprecated element.
|
| pack-priv XMLReaderAdapter. | qAtts
References Deprecated
XMLReaderAdapter.AttributesAdapter is deprecated or references (maybe indirectly) at least one deprecated element.
|
| pack-priv XMLReader |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | characters(char[]
An array of characters. ch, int The starting position in the array. start, int The number of characters to use. length)Implements org. Adapt a SAX2 characters event. |
| public void | |
| public void | endElement(String
The Namespace URI. uri, String The Namespace local name. localName, String The qualified (prefixed) name. qName)Implements org. Adapt a SAX2 end element event. |
| public void | endPrefixMapping(String
The prefix being mapped. prefix)Implements org. Adapt a SAX2 end prefix mapping event. |
| public void | ignorableWhitespace(char[]
An array of characters. ch, int The starting position in the array. start, int The number of characters to use. length)Implements org. Adapt a SAX2 ignorable whitespace event. |
| public void | parse(String
The absolute URL of the document. systemId)Implements org. Parse the document. |
| public void | parse(InputSource
An input source for the document. input)Implements org. Parse the document. |
| public void | processingInstruction(String
The processing instruction target. target, String The remainder of the processing instruction data)Implements org. Adapt a SAX2 processing instruction event. |
| public void | setDocumentHandler(DocumentHandler
The new SAX1 document event handler. handler)Implements org.
References Deprecated
DocumentHandler is deprecated or references (maybe indirectly) at least one deprecated element.
Register the SAX1 document event handler. |
| public void | setDocumentLocator(Locator
The document locator. locator)Implements org. Set a document locator. |
| public void | setDTDHandler(DTDHandler
The new DTD event handler. handler)Implements org. Register the DTD event handler. |
| public void | setEntityResolver(EntityResolver
The new resolver. resolver)Implements org. Register the entity resolver. |
| public void | setErrorHandler(ErrorHandler
The new error event handler. handler)Implements org. Register the error event handler. |
| public void | setLocale(Locale
the locale for error reporting. locale)Implements org. Set the locale for error reporting. |
| private void | |
| private void | |
| public void | skippedEntity(String
The name of the skipped entity. name)Implements org. Adapt a SAX2 skipped entity event. |
| public void | |
| public void | startElement(String
The Namespace URI. uri, String The Namespace local name. localName, String The qualified (prefixed) name. qName, Attributes The SAX2 attributes. atts)Implements org. Adapt a SAX2 start element event. |
| public void | startPrefixMapping(String
The prefix being mapped. prefix, String The Namespace URI being mapped to. uri)Implements org. Adapt a SAX2 start prefix mapping event. |
| documentHandler | back to summary |
|---|---|
| pack-priv DocumentHandler documentHandler
References Deprecated
See corresponding docs for further information. | |
| qAtts | back to summary |
|---|---|
| pack-priv XMLReaderAdapter. References Deprecated
See corresponding docs for further information. | |
| xmlReader | back to summary |
|---|---|
| pack-priv XMLReader xmlReader | |
| XMLReaderAdapter | back to summary |
|---|---|
| public XMLReaderAdapter() throws SAXException Create a new adapter. Use the "org.xml.sax.driver" property to locate the SAX2 driver to embed.
| |
| XMLReaderAdapter | back to summary |
|---|---|
| public XMLReaderAdapter(XMLReader xmlReader) Create a new adapter. Create a new adapter, wrapped around a SAX2 XMLReader. The adapter will make the XMLReader act like a SAX1 Parser.
| |
| characters | back to summary |
|---|---|
| public void characters(char[] ch, int start, int length) throws SAXException Implements org. Adapt a SAX2 characters event.
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Implements org. End document event.
| |
| endElement | back to summary |
|---|---|
| public void endElement(String uri, String localName, String qName) throws SAXException Implements org. Adapt a SAX2 end element event.
| |
| endPrefixMapping | back to summary |
|---|---|
| public void endPrefixMapping(String prefix) Implements org. Adapt a SAX2 end prefix mapping event.
| |
| ignorableWhitespace | back to summary |
|---|---|
| public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException Implements org. Adapt a SAX2 ignorable whitespace event.
| |
| parse | back to summary |
|---|---|
| public void parse(String systemId) throws IOException, SAXException Implements org. 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 | back to summary |
|---|---|
| public void parse(InputSource input) throws IOException, SAXException Implements org. 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.
| |
| processingInstruction | back to summary |
|---|---|
| public void processingInstruction(String target, String data) throws SAXException Implements org. Adapt a SAX2 processing instruction event.
| |
| setDocumentHandler | back to summary |
|---|---|
| public void setDocumentHandler(DocumentHandler handler) Implements org. References Deprecated
See corresponding docs for further information. Register the SAX1 document event handler. Note that the SAX1 document handler has no Namespace support.
| |
| setDocumentLocator | back to summary |
|---|---|
| public void setDocumentLocator(Locator locator) Implements org. Set a document locator.
| |
| setDTDHandler | back to summary |
|---|---|
| public void setDTDHandler(DTDHandler handler) Implements org. Register the DTD event handler.
| |
| setEntityResolver | back to summary |
|---|---|
| public void setEntityResolver(EntityResolver resolver) Implements org. Register the entity resolver.
| |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler handler) Implements org. Register the error event handler.
| |
| setLocale | back to summary |
|---|---|
| public void setLocale(Locale locale) throws SAXException Implements org. Set the locale for error reporting. This is not supported in SAX2, and will always throw an exception.
| |
| setup | back to summary |
|---|---|
| private void setup(XMLReader xmlReader) Internal setup.
| |
| setupXMLReader | back to summary |
|---|---|
| private void setupXMLReader() throws SAXException Set up the XML reader. | |
| skippedEntity | back to summary |
|---|---|
| public void skippedEntity(String name) throws SAXException Implements org. Adapt a SAX2 skipped entity event.
| |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws SAXException Implements org. Start document event.
| |
| startElement | back to summary |
|---|---|
| public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException Implements org. Adapt a SAX2 start element event.
| |
| startPrefixMapping | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String uri) Implements org. Adapt a SAX2 start prefix mapping event.
| |
References Deprecated
AttributeList is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private Attributes |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The length of the attribute list.Implements org. Return the number of attributes. |
| public String | Returns: The qualified name.Implements org. Return the qualified (prefixed) name of an attribute by position. |
| public String | Returns: The type.Implements org. Return the type of an attribute by position. |
| public String | Returns: The type.Implements org. Return the type of an attribute by qualified (prefixed) name. |
| public String | Returns: The value.Implements org. Return the value of an attribute by position. |
| public String | Returns: The value.Implements org. Return the value of an attribute by qualified (prefixed) name. |
| pack-priv void |
| attributes | back to summary |
|---|---|
| private Attributes attributes | |
| AttributesAdapter | back to summary |
|---|---|
| pack-priv AttributesAdapter() | |
| getLength | back to summary |
|---|---|
| public int getLength() Implements org. Return the number of attributes.
| |
| getName | back to summary |
|---|---|
| public String getName(int i) Implements org. Return the qualified (prefixed) name of an attribute by position.
| |
| getType | back to summary |
|---|---|
| public String getType(int i) Implements org. Return the type of an attribute by position.
| |
| getType | back to summary |
|---|---|
| public String getType(String qName) Implements org. Return the type of an attribute by qualified (prefixed) name.
| |
| getValue | back to summary |
|---|---|
| public String getValue(int i) Implements org. Return the value of an attribute by position.
| |
| getValue | back to summary |
|---|---|
| public String getValue(String qName) Implements org. Return the value of an attribute by qualified (prefixed) name.
| |
| setAttributes | back to summary |
|---|---|
| pack-priv void setAttributes(Attributes attributes) Set the embedded Attributes object. | |