Class JAXPParserFactory
java.lang.Object
JAXPParserFactory
class JAXPParserFactory
- extends java.lang.Object
A non-public utility class to allocate JAXP SAX parsers.
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 |
CVS_ID
private static final java.lang.String CVS_ID
- See Also:
- Constant Field Values
JAXP_SCHEMA_LANGUAGE_PROPERTY
private static final java.lang.String JAXP_SCHEMA_LANGUAGE_PROPERTY
- JAXP 1.2 schema language property id.
- See Also:
- Constant Field Values
JAXP_SCHEMA_LOCATION_PROPERTY
private static final java.lang.String JAXP_SCHEMA_LOCATION_PROPERTY
- JAXP 1.2 schema location property id.
- See Also:
- Constant Field Values
JAXPParserFactory
private JAXPParserFactory()
- Private constructor to forbid allocating instances of this utility class.
createParser
public static org.xml.sax.XMLReader createParser(boolean validating,
java.util.Map features,
java.util.Map properties)
throws JDOMException
- Creates a SAX parser allocated through the configured JAXP SAX parser factory.
- Parameters:
validating
- whether a validating parser is requested.features
- the user-defined SAX features.properties
- the user-defined SAX properties. - Returns:
- a configured XMLReader.
- Throws:
JDOMException
- if any error occurred when allocating or configuring the JAXP SAX parser.
setProperty
private static void setProperty(javax.xml.parsers.SAXParser parser,
java.util.Map properties,
java.lang.String name)
throws JDOMException
- Sets a property on a JAXP SAX parser object if and only if it is declared in the user-defined properties.
- Parameters:
parser
- the JAXP SAX parser to configure.properties
- the user-defined SAX properties.name
- the name of the property to set. - Throws:
JDOMException
- if any error occurred while configuring the property.