See: Description
Interface | Description |
---|---|
ComparisonHeartbeatListener |
A listener which receives events from the XMLComparator indicating that progress has been made in the current comparison.
|
Class | Description |
---|---|
FailureSeverity |
Defines the severity of a DeltaXMLProcessingException.
|
Exception | Description |
---|---|
CannotCompareDeltaException |
It is not permitted to use a delta file to the input to a comparison since a meaningful delta result cannot be produced.
|
CoreComparatorCancelled |
A
CancellationPolicy was in force which caused an XMLComparator to exit. |
CPUCountException |
An exception indicating that the license used to activate the software does not support the number of CPUs being used.
|
DeltaXMLException |
This class specifies an exceptional condition.
|
DeltaXMLProcessingException |
This class specifies an exceptional condition that occurred during the comparison and recombination processes.
|
DifferentRootElementException |
Files being compared must have equivalent root elements.
|
DifferingOrderedAttributesException |
The deltaxml:ordered attribute is placed on elements to control whether its children are compared using the ordered comparison
algorithm or the orderless algorithm.
|
InvalidClarkNameException |
An exception of this type happens when the core comparator expects a Clark name, e.g.
|
InvalidDeltaXmlMarkupForTable |
Thrown when something about 2 Tables being compared prevents the Comparator from making a valid attempt at comparison.
|
InvalidLicenseException |
An exception indicating that the wrong type of license was found or supplied at runtime.
|
InvalidOriginalPositionException |
An Element has an {http://www.deltaxml.com/ns/well-formed-delta-v1}:original-position attribute which has an invalid format.
|
InvalidSoftKeyAttributeException |
An exception of this type happens when Soft Key attributes are used in an incorrect or ambiguous way.
|
LicenseConcurrencyLimitException |
An exception indicating that the server-controlled concurrency limit has been exceeded.
|
LicenseContentException |
An exception indicating that the there was a problem with the license used to activate the software.
|
LicenseException |
This class groups all of the licensing related exceptions together.
|
LicenseExpiredException |
An exception indicating that the license used to activate the software has expired.
|
LicenseNotYetValidException |
An exception indicating that this license has not yet started
|
LicenseSecurityException |
An exception indicating a problem with the activation/licensing or other security related aspects of the DeltaXML software when
the JVM is using a Security Manager.
|
NoLicenseInstalledException |
An exception indicating that the software has not been sucessfully activated with an appropriate license.
|
PropertyRejectedException |
This Exception is thrown when a comparison is started on an XMLComparator on which setProperty has been called with arguments
that are not understood by a parent
XMLReader . |
UnorderedDuplicateKeysException |
An orderless element (one with the
deltaxml:ordered='false' attribute) cannot contain more than one child element
with the same name/type (ie. |
Error | Description |
---|---|
DeltaXMLError |
This class specifies an error condition.
|
A low-level JAXP interface for advanced users supporting comparison and recombination.
The comparison (or diff) function between two XML trees produces a delta tree which describes the differences between the two input trees. The recombination (or patch) operation can use the delta tree produced by the comparison and one of the original input files and regenerate the other input file.
NOTE: A new package: com.deltaxml.core
provides a PipelinedComparator
class which
makes the construction of XML filtering pipelines much easier. We recommend new users should consider using this package first.
This package is provided and maintained for those users who the PipelinedComparator does not provide a solution and who need
under the hood access to JAXP pipelining and also for forwards-compatibility for existing 2.x release users.
This API requires:
JAXP is required to provide a pluggable SAX Parser. The one included in the JDK will suffice, however alternative implementations including those provided in Saxon version 6, Xerces or Sun's JAXP reference implementation (also known as the crimson parser) can be used.
The software also uses the Result and Source interfaces from JAXP to specify the sinks and sources for the compare and combine
operations. These are normally part of TrAX and can be provided by including xalan.jar
from the Xalan-J version 2
release or by using jaxp.jar
from Sun's JAXP1.1 reference implementation.
Copies of saxon.jar
and xercesImpl.jar
are included with this release. They are provided for
convenience. They may be used by including them in the JVM classpath. Alternative JAXP implementations may be substituted.
A samples directory provides code samples and data together with a README file explaining compilation/running.
The most basic use of the API involves using a factory method to create a comparator or combiner object, and then invoking its compare() method:
File inA= new File("a.xml"); File inB= new File("b.xml"); File delta= new File("a-to-b.xml"); try { XMLComparator comparator= XMLComparatorFactory.newInstance().newXMLComparator(); comparator.compare(new StreamSource(inA), new StreamSource(inB), new StreamResult(delta)); } catch (DeltaXMLException dxe) { // Process exceptions. }
Properties and Features are used to configure a XMLComparator
or a
com.deltaxml.api.XMLCombiner
through the comparator.setProperty
,
comparator.setFeature
, combiner.setProperty
and combiner.setFeature
methods as appropriate.
The currently supported properties and features are documented in Features and Properties.
A single XMLComparator or XMLCombiner should not be used by multiple threads running concurrently. Different XMLComparators or XMLCombiners may be used concurrently by different threads.
Feature, property and error-listener settings are preserved between XMLComparator and XMLCombiner invocations. Although it is possible to use a XMLComparator or XMLCombiner multiple times, doing so will increase its memory footprint, as a certain amount of dictionary data is preserved or interned between compare or combine invocations. While there are some performance advantages in reuse scenarios, we currently recommend that XMLComparators and XMLCombiners are not used multiple times unless you understand their memory consumption characteristics. A future release may provide more control and support for different reuse scenarios.
Please visit our Support Page to find the relevant channels to use for any questions, bug-reports, suggested enhancements or any other matter related to this software.
Copyright © 2001-2018 DeltaXML Ltd. All Rights Reserved.