public class ParserFactory extends SAXParserFactory
| Modifier and Type | Field and Description |
|---|---|
static String |
FEATURE_NS |
static String |
FEATURE_PREF |
| Constructor and Description |
|---|
ParserFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getFeature(String name)
Returns the particular property requested for in the underlying
implementation of DefaultHandler.
|
SAXParser |
newSAXParser()
Creates a new instance of a SAXParser using the currently
configured factory parameters.
|
void |
setFeature(String name,
boolean value)
Sets the particular feature in the underlying implementation of
DefaultHandler.
|
void |
setNamespaceAware(boolean awareness)
Specifies that the parser produced by this code will
provide support for XML namespaces.
|
isNamespaceAware, isValidating, newInstance, setValidatingpublic static final String FEATURE_NS
public static final String FEATURE_PREF
public SAXParser newSAXParser() throws ParserConfigurationException, SAXException
newSAXParser in class SAXParserFactoryParserConfigurationException - if a parser cannot
be created which satisfies the requested configuration.SAXExceptionpublic void setNamespaceAware(boolean awareness)
false.setNamespaceAware in class SAXParserFactoryawareness - true if the parser produced by this code will
provide support for XML namespaces; false otherwise.public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
setFeature in class SAXParserFactoryname - The name of the feature to be set.value - The value of the feature to be set.SAXNotRecognizedException - When the underlying DefaultHandler does
not recognize the property name.SAXNotSupportedException - When the underlying DefaultHandler
recognizes the property name but doesn't support the
property.ParserConfigurationExceptionXMLReader.setFeature(java.lang.String, boolean)public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
getFeature in class SAXParserFactoryname - The name of the property to be retrieved.SAXNotRecognizedException - When the underlying DefaultHandler does
not recognize the property name.SAXNotSupportedException - When the underlying DefaultHandler
recognizes the property name but doesn't support the
property.ParserConfigurationExceptionXMLReader.getProperty(java.lang.String)Copyright © 2012 code4tv.com. All Rights Reserved.