Samples and Guides
Expanding on the high-level User Guide, the following samples and guides consider common use-cases and other features available with XML Compare and its included filters.
Samples provide documentation, code, data files and ant scripts that can be run with an evaluation or the full product. The document, available on this website, describes the concepts behind each sample. The resources associated with each sample can be downloaded from Bitbucket. Bitbucket is a system for hosting repositories, owned by Atlassian. It allows DeltaXML to provide the latest version of our samples, making them available for download. See below for the links to Bitbucket.
The samples are designed for use with very limited data and may not run efficiently or effectively with larger data files.
Guides are stand-alone documents available on this website.
Comparisons in XML Compare are typically performed using either the Pipelined Comparator or the Document Comparator. Both of these comparators can be configured and customized with additional filters through their respective APIs. Alternatively, the Pipelined Comparator can be customized via an XML file, referred to as a 'DXP', while the Document Comparator can be customized via a 'DCP' XML file.
Many of the samples here demonstrate how the same feature can be implemented using either the Pipelined or Document Comparator; other samples are dedicated to showing the use of just one of the comparator types. In some cases, the alternative comparator may have no equivalent feature. The Document Comparator, for example, has a built-in feature for 'formatting elements', it is therefore just this comparator that is used in the 'Formatting Element Changes' sample. Please see the Choosing the Comparator section of the User guide for further details.
Sample files are published on Bitbucket. Look for the Downloads option in the sample that you are interested in.
XML Documents
Guides
Samples
Title/Description | DocumentComparator | PipelinedComparatorS9 | DXP | DCP |
---|---|---|---|---|
How to perform a detailed comparison on textual changes using filters included with XML Compare. | ✓ | ✓ | ✓ | |
Character by Character Comparison How character by character comparison can be performed. | ✓ | ✓ | ||
Why inline formatting elements need special processing in order to minimise the impact that changing them has on the result file. | ✓ | ✓ | ||
Preserving Doctype Information How to include doctype information in the result file that is determined by the input file doctype rather than hard-coded into the pipeline. | ✓ | ✓ | ||
Preserving Processing Instructions and Comments How to convert processing instructions and comments into XML markup (and back again) so that they are not removed by XML Compare. | ✓ | ✓ | ||
How to retain entity references in the comparison output. | ✓ | ✓ | ||
How referenced images and other binary resources can be compared. | ✓ | ✓ | ||
This sample demonstrates the new CALS Table comparison approach has been introduced for XML Compare 12.0 and later | ✓ | |||
How SVG images are compared in the new feature introduced in XML Compare 13.0 | ✓ |
XML Data
Guides
Samples
Title/Description | DocumentComparator | PipelinedComparatorS9 | DXP | DCP |
---|---|---|---|---|
How and why to instruct XML Compare to treat XML data as an orderless set of elements. | ✓ | ✓ | ||
An example pipeline showing how to post-process a delta file to detect and mark data that has been moved. | ✓ | ✓ | ||
An example pipeline showing how to post-process a delta file to allow for tolerances when comparing numerical data. | ✓ |
XML Documents & XML Data
Guides
Samples
Title/Description | DocumentComparator | PipelinedComparatorS9 | DXP | DCP |
---|---|---|---|---|
An example pipeline showing how to post-process a delta result to "ignore" certain changes. | ✓ | ✓ | ||
An example pipeline showing how to merge two documents | ✓ | ✓ | ✓ | |
Using Keys with Ordered Data to Improve Matching When and how to add DeltaXML 'keys' to your input data in order to have more control over the matching process | ✓ | |||
Using XInclude with XML Compare An example pipeline that instructs the XML parser to process XInclude statements before passing the input data to XML Compare. | ✓ | ✓ |
DXP/DCP Filter Pipelines
Guides
Samples
Title/Description | DocumentComparator | PipelinedComparatorS9 | DXP | DCP |
---|---|---|---|---|
Specifying a pipeline using DXP or Java How to set up a PipelinedComparator. Also how DXP pipelines relate to our APIs using either Java or C# code. | ✓ | ✓ | ||
A demonstration of the capabilities of the folding DiffReport output format. | ✓ | ✓ |
Format Specific Information
Guides
Integrating XML Compare
The following discuss using the Java APIs and are generally independent of any filters used in the processing pipelines.
Guides
Samples
Title/Description | DocumentComparator | PipelinedComparatorS9 | DXP | DCP |
---|---|---|---|---|
A code sample to show how to instruct XML Compare to make use of catalog files. | ✓ | |||
A simple code sample showing how to use in memory DOM structures as inputs/outputs. | ✓ | |||
A simple code sample showing how to use in memory XOM structures as inputs/outputs. | ✓ | |||
An example servlet showing how XML Compare could be used and deployed in a servlet engine or Java EE application server. Also serves as a multithreaded test case. | ✓ | ✓ | ||
Using Deltas for XML Versioning (diff and patch) A simple code sample showing how to use a mixture of comparison and recombination demonstrating how XML Compare can be used manage XML versioning. | ✓ | ✓ |