XercesParser (Apache Tomcat 7.0.81 API Documentation)

org.apache.tomcat.util.digester

## Class XercesParser

- java.lang.Object
- - org.apache.tomcat.util.digester.XercesParser

-     public class XercesParser
      extends Object

  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.
  Since:
    1.6

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static String` | `JAXP_SCHEMA_LANGUAGE` The JAXP 1.2 property to set up the schemaLanguage used.
    `protected static float` | `version` A `float` representing the underlying Xerces version
    `protected static String` | `versionNumber` The current Xerces version.
    `protected static String` | `XERCES_DYNAMIC` Xerces dynamic validation property
    `protected static String` | `XERCES_SCHEMA` Xerces schema validation property

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XercesParser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SAXParser` | `newSAXParser(Properties properties)` Create a `SAXParser` based on the underlying `Xerces` version.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### JAXP_SCHEMA_LANGUAGE

          protected static String JAXP_SCHEMA_LANGUAGE

      The JAXP 1.2 property to set up the schemaLanguage used.

    - #### XERCES_DYNAMIC

          protected static String XERCES_DYNAMIC

      Xerces dynamic validation property

    - #### XERCES_SCHEMA

          protected static String XERCES_SCHEMA

      Xerces schema validation property

    - #### version

          protected static float version

      A `float` representing the underlying Xerces version

    - #### versionNumber

          protected static String versionNumber

      The current Xerces version.

  - ### Constructor Detail

    - #### XercesParser

          public XercesParser()

  - ### Method Detail

    - #### newSAXParser

          public static SAXParser newSAXParser(Properties properties)
                                        throws ParserConfigurationException,
                                               SAXException,
                                               SAXNotSupportedException

      Create a `SAXParser` based on the underlying `Xerces` version.
      Parameters:
        `properties` - parser specific properties/features
      Returns:
        an XML Schema/DTD enabled `SAXParser`
      Throws:
        `ParserConfigurationException`
        `SAXException`
        `SAXNotSupportedException`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.