Package org.apache.commons.digester.parser

Provides for parser recognition and parser dependent code.


Class Summary
GenericParser Create a SAXParser configured to support XML Schema and DTD.
XercesParser Create a SAXParser based on the underlying Xerces version.

Package org.apache.commons.digester.parser Description

Provides for parser recognition and parser dependent code.

Digester aims to support the widest range possible of parsers. Unfortunately, there are a few parser settings which have not been standardized. In most cases, the best practice is for the user to configure the parser themselves and pass it to Digester to use.

There are a few reasonable exceptions which Digester makes to this general rule. There are a small number of common use cases where insisting that the user configure the parser may reduce the portability of applications using Digester. These are outlined below.

Validating With Schema

When validating using schemas (rather than DTDs), settings for schema language and schema location are commonly needed. Unfortunately, there is a lack of standardization for these settings. In particular, for older versions of Xerces, these are set differently from newer versions.

In order to aid portability for this common use case, Digester uses the classes in this package (together with ParserFeatureSetterFactory) to guess the parser and set these properties appropriately. The aim is for Digester to automagically recognize and configure each parser. Help would be gratefully appreciated to maintain and improve the support in this area.

Copyright © 2001-2006 The Apache Software Foundation. All Rights Reserved.