public class XMLParserUtils
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
(package private) static org.apache.commons.logging.Log |
LOG |
Logger to be used.
|
Constructor | Description |
---|---|
XMLParserUtils() |
Modifier and Type | Method | Description |
---|---|---|
static OutputFormat |
getOutputFormat(AbstractProperties properties) |
|
static org.xml.sax.Parser |
getParser(AbstractProperties properties,
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(AbstractProperties properties) |
|
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.
|
public static void setFeaturesOnXmlReader(java.lang.String parserFeatures, java.lang.String parserFeaturesToDisable, boolean validation, boolean namespaces, org.xml.sax.XMLReader xmlReader)
properties
- the Properties to read parser features fromdefaultFeatures
- any default features to usevalidation
- 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 factorypublic 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(AbstractProperties properties, java.lang.String features)
public static Serializer getSerializer(AbstractProperties properties)
InternalContext.getSerializer()
public static OutputFormat getOutputFormat(AbstractProperties properties)
InternalContext.getOutputFormat()
public static XMLSerializerFactory getSerializerFactory(java.lang.String serializerFactoryName)
serializerFactoryName
- the class name of the serializer factoryIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com