|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.parsers.SAXParserFactory
public abstract class SAXParserFactory
A factory to configure and create SAXParser
instances.
Note: This class is not thread-safe. Applications must serialize access to this class if two or more threads access the same instance.
Constructor Summary | ||
---|---|---|
protected |
SAXParserFactory()
|
Method Summary | ||
---|---|---|
abstract boolean |
getFeature(String name)
Gets the value of the particular feature in the underlying implementation of org.xml.sax.XMLReader. |
|
boolean |
isNamespaceAware()
Determines whether this factory is configured to produce parsers that support namespaces. |
|
boolean |
isValidating()
Determines whether this factory is configured to produce parsers that validate XML documents. |
|
static SAXParserFactory |
newInstance()
Creates a new SAXParserFactory object. |
|
abstract SAXParser |
newSAXParser()
Creates a new SAXParser object using the currently configuration. |
|
abstract void |
setFeature(String name,
boolean value)
Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. |
|
void |
setNamespaceAware(boolean aware)
Configures parsers produced by this factory to support namespaces. |
|
void |
setValidating(boolean validate)
Configures parsers produced by this factory to validate XML documents. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SAXParserFactory()
Method Detail |
---|
public static SAXParserFactory newInstance()
SAXParserFactory
object.
SAXParserFactory
object.public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException
SAXParser
object using the currently configuration.
SAXParser
object.
ParserConfigurationException
- Thrown when a parser cannot be created with the current parameters.
SAXException
public void setNamespaceAware(boolean aware)
false
).
aware
- True to configure parsers produced by this factory to support namespaces, false otherwise.public boolean isNamespaceAware()
public void setValidating(boolean validate)
false
).
validate
- True to configure parsers produced by this factory
to validate XML documents, false otherwise.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 feature name.
SAXNotSupportedException
- When the underlying XMLReader
recognizes the feature name but does not support the
feature.
ParserConfigurationException.
ParserConfigurationException
public abstract boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
name
- The name of the feature whose value is to be retrieved.
SAXNotRecognizedException
- When the underlying XMLReader does
not recognize the feature name.
SAXNotSupportedException
- When the underlying XMLReader
recognizes the feature name but does not support the
feature.
ParserConfigurationException.
ParserConfigurationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal