|
BenQ Mobile |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.parsers.SAXParserFactory
Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
An implementation of the SAXParserFactory
class is
not guaranteed to be thread safe. It is up to the user application
to make sure about the use of the SAXParserFactory
from
more than one thread. Alternatively the application can have one instance
of the SAXParserFactory
per thread.
An application can use the same instance of the factory to obtain one or
more instances of the SAXParser
provided the instance
of the factory isn't being used in more than one thread at a time.
The static newInstance
method returns a new concrete
implementation of this class.
Constructor Summary | |
protected |
SAXParserFactory()
Default constructor. |
Method Summary | |
abstract boolean |
getFeature(java.lang.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(java.lang.String name,
boolean value)
Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. |
void |
setNamespaceAware(boolean lnamespaceAware)
Specifies that the parser produced by this code will provide support for XML namespaces. |
void |
setValidating(boolean lvalidating)
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, org.xml.sax.SAXException
ParserConfigurationException
- if a parser cannot
be created which satisfies the requested configuration.
org.xml.sax.SAXException
- if the underlying parser throws an
SAXException.public void setNamespaceAware(boolean lnamespaceAware)
false
.
lnamespaceAware
- true if the parser produced by this code will
provide support for XML namespaces; false otherwise.public boolean isNamespaceAware()
public void setValidating(boolean lvalidating)
lvalidating
- true if the parser produced by this code will
validate documents as they are parsed; false
otherwise.public boolean isValidating()
public abstract void setFeature(java.lang.String name, boolean value) throws ParserConfigurationException, org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
name
- The name of the feature to be set.value
- The value of the feature to be set.
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.
ParserConfigurationException
- thrown if the given feature is not
supported.XMLReader.setFeature(java.lang.String, boolean)
,
getFeature(String)
public abstract boolean getFeature(java.lang.String name) throws ParserConfigurationException, org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
name
- The name of the property to be retrieved.
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.
ParserConfigurationException
- if the parser do not satisfy
the requested configuration being queried.XMLReader.getProperty(java.lang.String)
,
setFeature(String, boolean)
|
BenQ Mobile |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner. All Rights Reserved. BenQ Corp. is a trademark licensee of Siemens AG. |
For further information about Mobility Toolkit (MTK) visit our Developer Portal. |