public class SAXParserImpl extends javax.xml.parsers.SAXParser implements JAXPConstants, org.apache.xerces.xs.PSVIProvider
javax.xml.parsers.SAXParser
.Modifier and Type | Class and Description |
---|---|
static class |
SAXParserImpl.JAXPSAXParser
Extension of SAXParser.
|
JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE, W3C_XML_SCHEMA
Modifier and Type | Method and Description |
---|---|
org.apache.xerces.xs.AttributePSVI |
getAttributePSVI(int index)
Provides
AttributePSVI given the index of an attribute
information item in the current element's attribute list. |
org.apache.xerces.xs.AttributePSVI |
getAttributePSVIByName(java.lang.String uri,
java.lang.String localname)
Provides
AttributePSVI given the namespace name and the
local name of an attribute information item in the current element's
attribute list. |
org.apache.xerces.xs.ElementPSVI |
getElementPSVI()
Provides the post schema validation item for the current element
information item.
|
org.xml.sax.Parser |
getParser()
Returns the SAX parser that is encapsulated by the
implementation of this class.
|
java.lang.Object |
getProperty(java.lang.String name)
returns the particular property requested for in the underlying
implementation of org.xml.sax.XMLReader.
|
javax.xml.validation.Schema |
getSchema()
Get a reference to the the
Schema being used by
the XML processor. |
org.xml.sax.XMLReader |
getXMLReader()
Returns the XMLReader that is encapsulated by the implementation of
this class.
|
boolean |
isNamespaceAware()
Indicates whether or not this parser is configured to
understand namespaces.
|
boolean |
isValidating()
Indicates whether or not this parser is configured to
validate XML documents.
|
boolean |
isXIncludeAware()
Gets the XInclude processing mode for this parser
|
void |
parse(org.xml.sax.InputSource is,
org.xml.sax.helpers.DefaultHandler dh)
Parse the content given
InputSource
as XML using the specified
DefaultHandler . |
void |
parse(org.xml.sax.InputSource is,
org.xml.sax.HandlerBase hb)
Parse the content given
InputSource
as XML using the specified
HandlerBase . |
void |
reset()
Reset this
SAXParser to its original configuration. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the particular property in the underlying implementation of
org.xml.sax.XMLReader.
|
public org.xml.sax.Parser getParser() throws org.xml.sax.SAXException
javax.xml.parsers.SAXParser
getParser
in class javax.xml.parsers.SAXParser
org.xml.sax.SAXException
- If any SAX errors occur during processing.public org.xml.sax.XMLReader getXMLReader()
getXMLReader
in class javax.xml.parsers.SAXParser
public boolean isNamespaceAware()
javax.xml.parsers.SAXParser
isNamespaceAware
in class javax.xml.parsers.SAXParser
public boolean isValidating()
javax.xml.parsers.SAXParser
isValidating
in class javax.xml.parsers.SAXParser
public boolean isXIncludeAware()
isXIncludeAware
in class javax.xml.parsers.SAXParser
SAXParserFactory.setXIncludeAware(boolean)
public void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setProperty
in class javax.xml.parsers.SAXParser
name
- The name of the property to be set.value
- The value of the property to be set.org.xml.sax.SAXNotRecognizedException
- When the underlying XMLReader does
not recognize the property name.org.xml.sax.SAXNotSupportedException
- When the underlying XMLReader
recognizes the property name but doesn't support the property.XMLReader.setProperty(java.lang.String, java.lang.Object)
public java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getProperty
in class javax.xml.parsers.SAXParser
name
- The name of the property to be retrieved.org.xml.sax.SAXNotRecognizedException
- When the underlying XMLReader does
not recognize the property name.org.xml.sax.SAXNotSupportedException
- When the underlying XMLReader
recognizes the property name but doesn't support the property.XMLReader.getProperty(java.lang.String)
public void parse(org.xml.sax.InputSource is, org.xml.sax.helpers.DefaultHandler dh) throws org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.SAXParser
InputSource
as XML using the specified
DefaultHandler
.parse
in class javax.xml.parsers.SAXParser
is
- The InputSource containing the content to be parsed.dh
- The SAX DefaultHandler to use.org.xml.sax.SAXException
- If any SAX errors occur during processing.java.io.IOException
- If any IO errors occur.DocumentHandler
public void parse(org.xml.sax.InputSource is, org.xml.sax.HandlerBase hb) throws org.xml.sax.SAXException, java.io.IOException
javax.xml.parsers.SAXParser
InputSource
as XML using the specified
HandlerBase
.
Use of the DefaultHandler version of this method is recommended as
the HandlerBase class has been deprecated in SAX 2.0parse
in class javax.xml.parsers.SAXParser
is
- The InputSource containing the content to be parsed.hb
- The SAX HandlerBase to use.org.xml.sax.SAXException
- If any SAX errors occur during processing.java.io.IOException
- If any IO errors occur.DocumentHandler
public javax.xml.validation.Schema getSchema()
javax.xml.parsers.SAXParser
Get a reference to the the Schema
being used by
the XML processor.
If no schema is being used, null
is returned.
getSchema
in class javax.xml.parsers.SAXParser
Schema
being used or null
if none in usepublic void reset()
javax.xml.parsers.SAXParser
Reset this SAXParser
to its original configuration.
SAXParser
is reset to the same state as when it was created with
SAXParserFactory.newSAXParser()
.
reset()
is designed to allow the reuse of existing SAXParser
s
thus saving resources associated with the creation of new SAXParser
s.
The reset SAXParser
is not guaranteed to have the same Schema
Object
, e.g. Object.equals(Object obj)
. It is guaranteed to have a functionally equal
Schema
.
reset
in class javax.xml.parsers.SAXParser
public org.apache.xerces.xs.ElementPSVI getElementPSVI()
org.apache.xerces.xs.PSVIProvider
startElement
or
endElement
call. If the method is called outside of the
specified scope, the return value is undefined.getElementPSVI
in interface org.apache.xerces.xs.PSVIProvider
public org.apache.xerces.xs.AttributePSVI getAttributePSVI(int index)
org.apache.xerces.xs.PSVIProvider
AttributePSVI
given the index of an attribute
information item in the current element's attribute list. The method
must be called by an application while in the scope of the methods
which report the start and end of an element at a point where the
attribute list is available. For example, for SAX the method must be
called while in the scope of the document handler's
startElement
call. If the method is called outside of
the specified scope, the return value is undefined.getAttributePSVI
in interface org.apache.xerces.xs.PSVIProvider
index
- The attribute index.public org.apache.xerces.xs.AttributePSVI getAttributePSVIByName(java.lang.String uri, java.lang.String localname)
org.apache.xerces.xs.PSVIProvider
AttributePSVI
given the namespace name and the
local name of an attribute information item in the current element's
attribute list. The method must be called by an application while in
the scope of the methods which report the start and end of an element
at a point where the attribute list is available. For example, for
SAX the method must be called while in the scope of the document
handler's startElement
call. If the method is called
outside of the specified scope, the return value is undefined.getAttributePSVIByName
in interface org.apache.xerces.xs.PSVIProvider
uri
- The namespace name of an attribute.localname
- The local name of an attribute.Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.