|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
javax.xml.parsers
|
Constructor Summary | |
protected |
SAXParserFactory()
|
Method Summary | |
abstract boolean |
getFeature(String name)
Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader. |
boolean |
isNamespaceAware()
Indicates whether or not the factory is configured to produce parsers which are namespace aware. |
boolean |
isValidating()
Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse. |
static SAXParserFactory |
newInstance()
Obtain a new instance of a SAXParserFactory . |
abstract SAXParser |
newSAXParser()
Creates a new instance of a SAXParser using the currently configured factory parameters. |
abstract void |
setFeature(String name,
boolean value)
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 validating)
Specifies that the parser produced by this code will validate documents as they are parsed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SAXParserFactory()
Method Detail |
public static SAXParserFactory newInstance() throws FactoryConfigurationError
SAXParserFactory
. This
static method creates a new factory instance
This method uses the following ordered lookup procedure to determine
the SAXParserFactory
implementation class to
load:
javax.xml.parsers.SAXParserFactory
system
property.
java.util.Properties
format and contains the fully qualified name of the
implementation class with the key being the system property defined
above.
META-INF/services/javax.xml.parsers.SAXParserFactory
in jars available to the runtime.
SAXParserFactory
instance.
SAXParserFactory
it can use the factory to
configure and obtain parser instances.
FactoryConfigurationError
- if the implementation is
not available or cannot be instantiated.public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException
ParserConfigurationException
- if a parser cannot
be created which satisfies the requested configuration.
SAXException
public void setNamespaceAware(boolean awareness)
false
.
awareness
- true if the parser produced by this code will
provide support for XML namespaces; false otherwise.public void setValidating(boolean validating)
false
.
validating
- true if the parser produced by this code will
validate documents as they are parsed; false otherwise.public boolean isNamespaceAware()
public boolean isValidating()
public abstract void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
name
- The name of the feature to be set.value
- 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.
ParserConfigurationException
XMLReader.setFeature(java.lang.String, boolean)
public abstract boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
name
- 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.
ParserConfigurationException
XMLReader.getProperty(java.lang.String)