Package org.apache.tomcat.util.digester
Class XercesParser
- java.lang.Object
-
- org.apache.tomcat.util.digester.XercesParser
-
public class XercesParser extends Object
Create aSAXParserbased 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.- Since:
- 1.6
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringJAXP_SCHEMA_LANGUAGEThe JAXP 1.2 property to set up the schemaLanguage used.protected static LoggerlogThe Log to which all SAX event related logging calls will be made.protected static StringXERCES_DYNAMICXerces dynamic validation propertyprotected static StringXERCES_SCHEMAXerces schema validation property
-
Constructor Summary
Constructors Constructor Description XercesParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SAXParsernewSAXParser(Properties properties)Create aSAXParserbased on the underlyingXercesversion.
-
-
-
Field Detail
-
log
protected static final Logger log
The Log to which all SAX event related logging calls will be made.
-
JAXP_SCHEMA_LANGUAGE
protected static final String JAXP_SCHEMA_LANGUAGE
The JAXP 1.2 property to set up the schemaLanguage used.- See Also:
- Constant Field Values
-
XERCES_DYNAMIC
protected static final String XERCES_DYNAMIC
Xerces dynamic validation property- See Also:
- Constant Field Values
-
XERCES_SCHEMA
protected static final String XERCES_SCHEMA
Xerces schema validation property- See Also:
- Constant Field Values
-
-
Method Detail
-
newSAXParser
public static SAXParser newSAXParser(Properties properties) throws ParserConfigurationException, SAXException, SAXNotSupportedException
Create aSAXParserbased on the underlyingXercesversion.- Parameters:
properties- parser specific properties/features- Returns:
- an XML Schema/DTD enabled
SAXParser - Throws:
ParserConfigurationExceptionSAXExceptionSAXNotSupportedException
-
-