org.apache.commons.digester.parser
public class: XercesParser [javadoc |
source]
java.lang.Object
org.apache.commons.digester.parser.XercesParser
Create a
SAXParser based on the underlying Xerces version.
Currently, Xerces 2.3 and up doesn't implement schema validation the same way
2.1 was. In other to support schema validation in a portable way between
parser, some features/properties need to be set.
| Field Summary |
|---|
| protected static Log | log | The Log to which all SAX event related logging calls will be made. |
| protected static String | JAXP_SCHEMA_LANGUAGE | The JAXP 1.2 property to set up the schemaLanguage used. |
| protected static String | XERCES_DYNAMIC | Xerces dynamic validation property |
| protected static String | XERCES_SCHEMA | Xerces schema validation property |
| protected static float | version | A float representing the underlying Xerces version |
| protected static String | versionNumber | The current Xerces version. |
| Method from org.apache.commons.digester.parser.XercesParser Summary: |
|---|
|
newSAXParser |
| Method from org.apache.commons.digester.parser.XercesParser Detail: |
public static SAXParser newSAXParser(Properties properties) throws SAXNotSupportedException, SAXException, ParserConfigurationException {
SAXParserFactory factory =
(SAXParserFactory)properties.get("SAXParserFactory");
if (versionNumber == null){
versionNumber = getXercesVersion();
version = new Float( versionNumber ).floatValue();
}
// Note: 2.2 is completely broken (with XML Schema).
if (version > 2.1) {
configureXerces(factory);
return factory.newSAXParser();
} else {
SAXParser parser = factory.newSAXParser();
configureOldXerces(parser,properties);
return parser;
}
}
Create a SAXParser based on the underlying
Xerces version. |