For many years, the XML parser Apache Xerces has been distributed with all of our products. While not required, its status has been as our recommended XML parser. From the XML Compare 7.2 release, some new features require Xerces as the parser, with a minimum required version of 2.9.0. This is the version that is distributed with our product releases. This document outlines which functions require Xerces and gives details on how to use a different parser if you wish to do so.
DCP is the DocumentComparator's equivalent of the PipelinedComparator's DXP, although it is defined as an XMLSchema rather than as a DTD. Processing of the schema-defined XML files makes use of some validation features that are only available in Xerces 2.9.0 and above.
The latest version of XML Compare includes improvements to the handling of whitespace. A requirement for this improved functionality was
to add the detection of 'ignorable whitespace' to the existing
This detection requires access to methods available only in Xerces 2.9.0 and above.
com.deltaxml.config.JavaPlatform.useSAXParserFactory property is now set to '
false' by default. This means that
SAXParser is created inside XML Compare, it is done using an explicit class name that loads Xerces.
In the .NET API, the explicit instantiation of a Xerces class is the only option available.
While the jar files for the command-line tool and the GUI have always contained a classpath containing Xerces,
deltaxml.jar did not.
This has now been updated to include
xercesImpl.jar on paths including
While use of the
classes now requires Xerces, it is still possible to use some of our legacy classes without requiring Xerces.
com.deltaxml.core.PipelinedComparator can still be used without Xerces as the parser as long as
functionality is not used. If it is, a
ClassNotFoundException will be thrown with details about the required Xerces classes. To configure
the use of a different parser, please see the 'Using a different parser' section below.
Three changes muct be made in order to use a different parser:
com.deltaxml.config.JavaPlatform.useSAXParserFactory must be set to true.
See Configuration Properties for more information on
how to do this.
2. The existing
xercesImpl.jar will still be loaded from the
In order to stop this from occurring, either move or rename the
xercesImpl.jar in the XML Compare release directory.
3. This stage is optional. Completing the steps above will cause the JVM's internal parser to be used (this is not recommended).
To replace it with a different parser, make the relevant jar files available on the classpath. If the jar files do not advertise themselves as implementing
SAXParserFactory, you will need to set up the JVM property appropriately.