java.lang.ObjectJAXPParserFactory
class JAXPParserFactory
A non-public utility class to allocate JAXP SAX parsers.
Field Summary | |
---|---|
private static java.lang.String |
CVS_ID
|
private static java.lang.String |
JAXP_SCHEMA_LANGUAGE_PROPERTY
JAXP 1.2 schema language property id. |
private static java.lang.String |
JAXP_SCHEMA_LOCATION_PROPERTY
JAXP 1.2 schema location property id. |
Constructor Summary | |
---|---|
private |
JAXPParserFactory()
Private constructor to forbid allocating instances of this utility class. |
Method Summary | |
---|---|
static org.xml.sax.XMLReader |
createParser(boolean validating,
java.util.Map features,
java.util.Map properties)
Creates a SAX parser allocated through the configured JAXP SAX parser factory. |
private static void |
setProperty(javax.xml.parsers.SAXParser parser,
java.util.Map properties,
java.lang.String name)
Sets a property on a JAXP SAX parser object if and only if it is declared in the user-defined properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String CVS_ID
private static final java.lang.String JAXP_SCHEMA_LANGUAGE_PROPERTY
private static final java.lang.String JAXP_SCHEMA_LOCATION_PROPERTY
Constructor Detail |
---|
private JAXPParserFactory()
Method Detail |
---|
public static org.xml.sax.XMLReader createParser(boolean validating, java.util.Map features, java.util.Map properties) throws JDOMException
validating
- whether a validating parser is requested.features
- the user-defined SAX features.properties
- the user-defined SAX properties.
JDOMException
- if any error occurred when allocating or
configuring the JAXP SAX parser.private static void setProperty(javax.xml.parsers.SAXParser parser, java.util.Map properties, java.lang.String name) throws JDOMException
parser
- the JAXP SAX parser to configure.properties
- the user-defined SAX properties.name
- the name of the property to set.
JDOMException
- if any error occurred while configuring
the property.