|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.exolab.castor.xml.util.XMLParserUtils
A couple of routines to manipulate XMLParser instances. Mostly extracted from 'old' LocalConfiguration class.
| Field Summary | |
(package private) static org.apache.commons.logging.Log |
LOG
Logger to be used. |
| Constructor Summary | |
XMLParserUtils()
|
|
| Method Summary | |
static OutputFormat |
getOutputFormat(Configuration configuration)
|
static org.xml.sax.Parser |
getParser(Configuration configuration,
java.lang.String features)
|
static javax.xml.parsers.SAXParser |
getSAXParser(boolean validation,
boolean namespaces)
To get a SAXParser instance which is then used to get either parser or XMLReader. |
static Serializer |
getSerializer(Configuration configuration)
|
static XMLSerializerFactory |
getSerializerFactory(java.lang.String serializerFactoryName)
Returns the currently configured XMLSerializerFactory instance. |
static org.xml.sax.Parser |
instantiateParser(java.lang.String className)
Instantiates an Parser instance directly, using Class.forName(String)
to obtain the Class instance, and uses Class.newInstance()
to create the actual instance. |
static org.xml.sax.XMLReader |
instantiateXMLReader(java.lang.String className)
Instantiates an XMLReader instance directly, using Class.forName(String)
to obtain the Class instance, and uses Class.newInstance()
to create the actual instance. |
static void |
setFeaturesOnXmlReader(java.lang.String parserFeatures,
java.lang.String parserFeaturesToDisable,
boolean validation,
boolean namespaces,
org.xml.sax.XMLReader xmlReader)
Sets features on XML reader instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final org.apache.commons.logging.Log LOG
| Constructor Detail |
public XMLParserUtils()
| Method Detail |
public static void setFeaturesOnXmlReader(java.lang.String parserFeatures,
java.lang.String parserFeaturesToDisable,
boolean validation,
boolean namespaces,
org.xml.sax.XMLReader xmlReader)
validation - Whether to enable validation or not.namespaces - Whether to enable namespace support for not.xmlReader - The XMLReader instance to configure.
public static javax.xml.parsers.SAXParser getSAXParser(boolean validation,
boolean namespaces)
validation - validation flag to set into parser factorynamespaces - namespace flag to set into parser factory
public static org.xml.sax.XMLReader instantiateXMLReader(java.lang.String className)
XMLReader instance directly, using Class.forName(String)
to obtain the Class instance, and uses Class.newInstance()
to create the actual instance.
className - The class name of the XMLReader instance to be instantiated.
XMLReader instance.public static org.xml.sax.Parser instantiateParser(java.lang.String className)
Parser instance directly, using Class.forName(String)
to obtain the Class instance, and uses Class.newInstance()
to create the actual instance.
className - The class name of the Parser instance to be instantiated.
Parser instance.
public static org.xml.sax.Parser getParser(Configuration configuration,
java.lang.String features)
public static Serializer getSerializer(Configuration configuration)
InternalContext.getSerializer()public static OutputFormat getOutputFormat(Configuration configuration)
InternalContext.getOutputFormat()public static XMLSerializerFactory getSerializerFactory(java.lang.String serializerFactoryName)
serializerFactoryName - the class name of the serializer factory
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||