public class JAXPSAXParserFactory extends SAXParserFactory
If a validating parser is requested, this class will search for
another SAXParserFactory to create the validating parser.
This class will search for a factory in the following ways:
com.bluecast.xml.ValidatingSAXParserFactory
javax.xml.parsers.SAXParserFactory
org.apache.crimson.jaxp.SAXParserFactoryImpl)
ParserConfigurationException
will be thrown.| Constructor and Description |
|---|
JAXPSAXParserFactory() |
| 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.
|
static SAXParserFactory |
newInstance() |
SAXParser |
newSAXParser()
Creates a new instance of a SAXParser using the currently
configured factory parameters.
|
void |
setFeature(java.lang.String name,
boolean enabled)
Sets the particular feature in the underlying implementation of
org.xml.sax.XMLReader.
|
void |
setNamespaceAware(boolean awareness)
Specifies that the parser produced by this code will
provide support for XML namespaces.
|
void |
setValidating(boolean value)
Specifies that the parser produced by this code will
validate documents as they are parsed.
|
isNamespaceAware, isValidatingpublic static SAXParserFactory newInstance()
public boolean getFeature(java.lang.String name)
throws ParserConfigurationException,
SAXNotRecognizedException,
SAXNotSupportedException
SAXParserFactorygetFeature in class SAXParserFactoryname - The name of the property to be retrieved.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.ParserConfigurationExceptionXMLReader.getProperty(java.lang.String)public SAXParser newSAXParser() throws ParserConfigurationException, SAXException
SAXParserFactorynewSAXParser in class SAXParserFactoryParserConfigurationException - if a parser cannot
be created which satisfies the requested configuration.SAXExceptionpublic void setFeature(java.lang.String name,
boolean enabled)
throws ParserConfigurationException,
SAXNotRecognizedException,
SAXNotSupportedException
SAXParserFactorysetFeature in class SAXParserFactoryname - The name of the feature to be set.enabled - The value of the feature to be set.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.ParserConfigurationExceptionXMLReader.setFeature(java.lang.String, boolean)public void setNamespaceAware(boolean awareness)
SAXParserFactoryfalse.setNamespaceAware in class SAXParserFactoryawareness - true if the parser produced by this code will
provide support for XML namespaces; false otherwise.public void setValidating(boolean value)
SAXParserFactoryfalse.setValidating in class SAXParserFactoryvalue - true if the parser produced by this code will
validate documents as they are parsed; false otherwise.