Top Description Fields Constructors Methods
org.jdom.input

pack-priv Class JAXPParserFactory

extends Object
Class Inheritance
Imports
java.util.*, javax.xml.parsers.*, org.jdom.*, org.xml.sax.*

A non-public utility class to allocate JAXP SAX parsers.
Author
Laurent Bihanic
Version
$Revision: 1.6 $, $Date: 2007/11/10 05:29:00 $

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
JAXP_SCHEMA_LANGUAGE_PROPERTY

JAXP 1.2 schema language property id.

private static final String
JAXP_SCHEMA_LOCATION_PROPERTY

JAXP 1.2 schema location property id.

Constructor Summary

AccessConstructor and Description
private
JAXPParserFactory()

Private constructor to forbid allocating instances of this utility class.

Method Summary

Modifier and TypeMethod and Description
public static XMLReader

Returns:

a configured XMLReader.
createParser
(boolean
whether a validating parser is requested.
validating
,
Map<K, V>
the user-defined SAX features.
features
,
Map<K, V>
the user-defined SAX properties.
properties
)

Creates a SAX parser allocated through the configured JAXP SAX parser factory.

private static void
setProperty(SAXParser
the JAXP SAX parser to configure.
parser
,
Map<K, V>
the user-defined SAX properties.
properties
,
String
the name of the property to set.
name
)

Sets a property on a JAXP SAX parser object if and only if it is declared in the user-defined properties.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CVS_IDback to summary
private static final String CVS_ID
JAXP_SCHEMA_LANGUAGE_PROPERTYback to summary
private static final String JAXP_SCHEMA_LANGUAGE_PROPERTY

JAXP 1.2 schema language property id.

JAXP_SCHEMA_LOCATION_PROPERTYback to summary
private static final String JAXP_SCHEMA_LOCATION_PROPERTY

JAXP 1.2 schema location property id.

Constructor Detail

JAXPParserFactoryback to summary
private JAXPParserFactory()

Private constructor to forbid allocating instances of this utility class.

Method Detail

createParserback to summary
public static XMLReader createParser(boolean validating, Map<K, V> features, Map<K, V> properties) throws JDOMException

Creates a SAX parser allocated through the configured JAXP SAX parser factory.

Parameters
validating:boolean

whether a validating parser is requested.

features:Map<K, V>

the user-defined SAX features.

properties:Map<K, V>

the user-defined SAX properties.

Returns:XMLReader

a configured XMLReader.

Exceptions
JDOMException:
if any error occurred when allocating or configuring the JAXP SAX parser.
setPropertyback to summary
private static void setProperty(SAXParser parser, Map<K, V> properties, 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:SAXParser

the JAXP SAX parser to configure.

properties:Map<K, V>

the user-defined SAX properties.

name:String

the name of the property to set.

Exceptions
JDOMException:
if any error occurred while configuring the property.