|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.parsers.SAXParserFactory org.apache.xerces.jaxp.SAXParserFactoryImpl
public class SAXParserFactoryImpl
This is the implementation specific class for the
javax.xml.parsers.SAXParserFactory
. This is the platform
default implementation for the platform.
Constructor Summary | |
---|---|
SAXParserFactoryImpl()
|
Method Summary | |
---|---|
boolean |
getFeature(java.lang.String name)
returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader. |
Schema |
getSchema()
Gets the Schema object specified through
the SAXParserFactory.setSchema(Schema schema) method. |
boolean |
isXIncludeAware()
Get state of XInclude processing. |
SAXParser |
newSAXParser()
Creates a new instance of SAXParser using the currently
configured factory parameters. |
void |
setFeature(java.lang.String name,
boolean value)
Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. |
void |
setSchema(Schema grammar)
Set the Schema to be used by parsers created
from this factory. |
void |
setXIncludeAware(boolean state)
Set state of XInclude processing. |
Methods inherited from class javax.xml.parsers.SAXParserFactory |
---|
isNamespaceAware, isValidating, newInstance, setNamespaceAware, setValidating |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAXParserFactoryImpl()
Method Detail |
---|
public SAXParser newSAXParser() throws ParserConfigurationException
SAXParser
using the currently
configured factory parameters.
newSAXParser
in class SAXParserFactory
ParserConfigurationException
- if a parser cannot
be created which satisfies the requested configuration.public void setFeature(java.lang.String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
setFeature
in class SAXParserFactory
name
- The name of the feature to be set.value
- The value of the feature to be set.
ParserConfigurationException
- if a parser cannot
be created which satisfies the requested configuration.
SAXNotRecognizedException
- When the underlying XMLReader does
not recognize the property name.
SAXNotSupportedException
- When the underlying XMLReader
recognizes the property name but doesn't support the
property.XMLReader.setFeature(java.lang.String, boolean)
public boolean getFeature(java.lang.String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
getFeature
in class SAXParserFactory
name
- The name of the property to be retrieved.
ParserConfigurationException
- if a parser cannot be created which satisfies the requested configuration.
SAXNotRecognizedException
- When the underlying XMLReader does not recognize the property name.
SAXNotSupportedException
- When the underlying XMLReader recognizes the property name but doesn't support the property.XMLReader.getProperty(java.lang.String)
public Schema getSchema()
SAXParserFactory
Schema
object specified through
the SAXParserFactory.setSchema(Schema schema)
method.
getSchema
in class SAXParserFactory
Schema
object that was last set through
the SAXParserFactory.setSchema(Schema)
method, or null
if the method was not invoked since a SAXParserFactory
is created.public void setSchema(Schema grammar)
SAXParserFactory
Set the Schema
to be used by parsers created
from this factory.
When a Schema
is non-null, a parser will use a validator
created from it to validate documents before it passes information
down to the application.
When warnings/errors/fatal errors are found by the validator, the parser must
handle them as if those errors were found by the parser itself.
In other words, if the user-specified ErrorHandler
is set, it must receive those errors, and if not, they must be
treated according to the implementation specific
default error handling rules.
A validator may modify the SAX event stream (for example by adding default values that were missing in documents), and a parser is responsible to make sure that the application will receive those modified event stream.
Initialy, null
is set as the Schema
.
This processing will take effect even if
the SAXParserFactory.isValidating()
method returns false
.
It is an error to use
the http://java.sun.com/xml/jaxp/properties/schemaSource
property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
property in conjunction with a non-null Schema
object.
Such configuration will cause a SAXException
exception when those properties are set on a SAXParser
.
A parser must be able to work with any Schema
implementation. However, parsers and schemas are allowed
to use implementation-specific custom mechanisms
as long as they yield the result described in the specification.
setSchema
in class SAXParserFactory
grammar
- Schema
to use, null
to remove a schema.public boolean isXIncludeAware()
SAXParserFactory
Get state of XInclude processing.
isXIncludeAware
in class SAXParserFactory
public void setXIncludeAware(boolean state)
SAXParserFactory
Set state of XInclude processing.
If XInclude markup is found in the document instance, should it be processed as specified in XML Inclusions (XInclude) Version 1.0.
XInclude processing defaults to false
.
setXIncludeAware
in class SAXParserFactory
state
- Set XInclude processing to true
or
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |