public class SAXParserFactoryImpl
extends javax.xml.parsers.SAXParserFactory
javax.xml.parsers.SAXParserFactory. This is the platform
default implementation for the platform.| Constructor and Description |
|---|
SAXParserFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getFeature(java.lang.String name)
returns the particular property requested for in the underlying
implementation of org.xml.sax.XMLReader.
|
javax.xml.validation.Schema |
getSchema()
Gets the
Schema object specified through
the SAXParserFactory.setSchema(Schema schema) method. |
boolean |
isXIncludeAware()
Get state of XInclude processing.
|
javax.xml.parsers.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(javax.xml.validation.Schema grammar)
Set the
Schema to be used by parsers created
from this factory. |
void |
setXIncludeAware(boolean state)
Set state of XInclude processing.
|
public javax.xml.parsers.SAXParser newSAXParser()
throws javax.xml.parsers.ParserConfigurationException
SAXParser using the currently
configured factory parameters.newSAXParser in class javax.xml.parsers.SAXParserFactoryjavax.xml.parsers.ParserConfigurationException - if a parser cannot
be created which satisfies the requested configuration.public void setFeature(java.lang.String name,
boolean value)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
setFeature in class javax.xml.parsers.SAXParserFactoryname - The name of the feature to be set.value - The value of the feature to be set.javax.xml.parsers.ParserConfigurationException - if a parser cannot
be created which satisfies the requested configuration.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.setFeature(java.lang.String, boolean)public boolean getFeature(java.lang.String name)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
getFeature in class javax.xml.parsers.SAXParserFactoryname - The name of the property to be retrieved.javax.xml.parsers.ParserConfigurationException - if a parser cannot be created which satisfies the requested configuration.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 javax.xml.validation.Schema getSchema()
javax.xml.parsers.SAXParserFactorySchema object specified through
the SAXParserFactory.setSchema(Schema schema) method.getSchema in class javax.xml.parsers.SAXParserFactorySchema 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(javax.xml.validation.Schema grammar)
javax.xml.parsers.SAXParserFactorySet 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.
Initially, 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 javax.xml.parsers.SAXParserFactorygrammar - Schema to use, null to remove a schema.public boolean isXIncludeAware()
javax.xml.parsers.SAXParserFactoryGet state of XInclude processing.
isXIncludeAware in class javax.xml.parsers.SAXParserFactorypublic void setXIncludeAware(boolean state)
javax.xml.parsers.SAXParserFactorySet 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 javax.xml.parsers.SAXParserFactorystate - Set XInclude processing to true or
falseCopyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.