public class WstxSAXParser extends SAXParser implements Parser, XMLReader, Attributes2, Locator2, DTDEventListener
| Modifier and Type | Field and Description |
|---|---|
protected AttributeCollector |
mAttrCollector |
protected int |
mAttrCount
Number of attributes accessible via
Attributes and
Attributes2 interfaces, for the current start element. |
protected ReaderConfig |
mConfig |
protected ContentHandler |
mContentHandler |
protected DeclHandler |
mDeclHandler |
protected DTDHandler |
mDTDHandler |
protected InputElementStack |
mElemStack |
protected String |
mEncoding |
protected EntityResolver |
mEntityResolver |
protected ErrorHandler |
mErrorHandler |
protected boolean |
mFeatNsPrefixes |
protected LexicalHandler |
mLexicalHandler |
protected int |
mNsCount
Need to keep track of number of namespaces, if namespace declarations
are to be reported along with attributes (see
mFeatNsPrefixes). |
protected BasicStreamReader |
mScanner
Since the stream reader would mostly be just a wrapper around
the underlying scanner (its main job is to implement Stax
interface), we can and should just use the scanner.
|
protected boolean |
mStandalone |
protected WstxInputFactory |
mStaxFactory
We will need the factory reference mostly for constructing
underlying stream reader we use.
|
protected String |
mXmlVersion |
| Constructor and Description |
|---|
WstxSAXParser() |
WstxSAXParser(WstxInputFactory sf,
boolean nsPrefixes)
NOTE: this was a protected constructor for versions 4.0
and 3.2; changed to public in 4.1
|
protected final WstxInputFactory mStaxFactory
protected final ReaderConfig mConfig
protected boolean mFeatNsPrefixes
protected BasicStreamReader mScanner
protected AttributeCollector mAttrCollector
protected InputElementStack mElemStack
protected String mEncoding
protected String mXmlVersion
protected boolean mStandalone
protected ContentHandler mContentHandler
protected DTDHandler mDTDHandler
protected EntityResolver mEntityResolver
protected ErrorHandler mErrorHandler
protected LexicalHandler mLexicalHandler
protected DeclHandler mDeclHandler
protected int mAttrCount
Attributes and
Attributes2 interfaces, for the current start element.
Note: does not include namespace declarations, even they are to be reported as attributes.
protected int mNsCount
mFeatNsPrefixes).public WstxSAXParser(WstxInputFactory sf, boolean nsPrefixes)
NOTE: this was a protected constructor for versions 4.0 and 3.2; changed to public in 4.1
public WstxSAXParser()
public final XMLReader getXMLReader()
getXMLReader in class SAXParserpublic final ReaderConfig getStaxConfig()
public boolean isNamespaceAware()
isNamespaceAware in class SAXParserpublic boolean isValidating()
isValidating in class SAXParserpublic Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
getProperty in interface XMLReadergetProperty in class SAXParserSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
setProperty in interface XMLReadersetProperty in class SAXParserSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic void parse(InputSource is, HandlerBase hb) throws SAXException, IOException
parse in class SAXParserSAXExceptionIOExceptionpublic void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException
parse in class SAXParserSAXExceptionIOExceptionpublic ContentHandler getContentHandler()
getContentHandler in interface XMLReaderpublic DTDHandler getDTDHandler()
getDTDHandler in interface XMLReaderpublic EntityResolver getEntityResolver()
getEntityResolver in interface XMLReaderpublic ErrorHandler getErrorHandler()
getErrorHandler in interface XMLReaderpublic boolean getFeature(String name) throws SAXNotRecognizedException
getFeature in interface XMLReaderSAXNotRecognizedExceptionpublic void setContentHandler(ContentHandler handler)
setContentHandler in interface XMLReaderpublic void setDTDHandler(DTDHandler handler)
setDTDHandler in interface ParsersetDTDHandler in interface XMLReaderpublic void setEntityResolver(EntityResolver resolver)
setEntityResolver in interface ParsersetEntityResolver in interface XMLReaderpublic void setErrorHandler(ErrorHandler handler)
setErrorHandler in interface ParsersetErrorHandler in interface XMLReaderpublic void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
setFeature in interface XMLReaderSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic void parse(InputSource input) throws SAXException
parse in interface Parserparse in interface XMLReaderSAXExceptionpublic void parse(String systemId) throws SAXException
parse in interface Parserparse in interface XMLReaderSAXExceptionpublic void setDocumentHandler(DocumentHandler handler)
setDocumentHandler in interface Parserpublic int getIndex(String qName)
getIndex in interface Attributespublic int getIndex(String uri, String localName)
getIndex in interface Attributespublic int getLength()
getLength in interface Attributespublic String getLocalName(int index)
getLocalName in interface Attributespublic String getQName(int index)
getQName in interface Attributespublic String getType(int index)
getType in interface Attributespublic String getType(String qName)
getType in interface Attributespublic String getType(String uri, String localName)
getType in interface Attributespublic String getURI(int index)
getURI in interface Attributespublic String getValue(int index)
getValue in interface Attributespublic String getValue(String qName)
getValue in interface Attributespublic String getValue(String uri, String localName)
getValue in interface Attributespublic boolean isDeclared(int index)
isDeclared in interface Attributes2public boolean isDeclared(String qName)
isDeclared in interface Attributes2public boolean isDeclared(String uri, String localName)
isDeclared in interface Attributes2public boolean isSpecified(int index)
isSpecified in interface Attributes2public boolean isSpecified(String qName)
isSpecified in interface Attributes2public boolean isSpecified(String uri, String localName)
isSpecified in interface Attributes2public int getColumnNumber()
getColumnNumber in interface Locatorpublic int getLineNumber()
getLineNumber in interface Locatorpublic String getPublicId()
getPublicId in interface Locatorpublic String getSystemId()
getSystemId in interface Locatorpublic String getEncoding()
getEncoding in interface Locator2public String getXMLVersion()
getXMLVersion in interface Locator2public boolean dtdReportComments()
dtdReportComments in interface DTDEventListenerpublic void dtdComment(char[] data,
int offset,
int len)
dtdComment in interface DTDEventListenerpublic void dtdProcessingInstruction(String target, String data)
dtdProcessingInstruction in interface DTDEventListenerpublic void dtdSkippedEntity(String name)
dtdSkippedEntity in interface DTDEventListenerpublic void dtdNotationDecl(String name, String publicId, String systemId, URL baseURL) throws XMLStreamException
dtdNotationDecl in interface DTDEventListenerXMLStreamExceptionpublic void dtdUnparsedEntityDecl(String name, String publicId, String systemId, String notationName, URL baseURL) throws XMLStreamException
dtdUnparsedEntityDecl in interface DTDEventListenerXMLStreamExceptionpublic void attributeDecl(String eName, String aName, String type, String mode, String value)
attributeDecl in interface DTDEventListenerpublic void dtdElementDecl(String name, String model)
dtdElementDecl in interface DTDEventListenerpublic void dtdExternalEntityDecl(String name, String publicId, String systemId)
dtdExternalEntityDecl in interface DTDEventListenerpublic void dtdInternalEntityDecl(String name, String value)
dtdInternalEntityDecl in interface DTDEventListenerCopyright © 2022 FasterXML. All rights reserved.