<xml>cmp is the right tool, if you ..?
have one of the following tasks:
- comparing xml-data
- sorting xml-data
- merging xml-data
- regrouping xml-data
The comparison result shows the differences in context of the xml-data in pdf-format and xml-format. The user can detect the colored marked differences at a glance in the pdf-document. The xml-format is suitable for further automatic processing steps.
work with large xml-files
The <xml>cmp-tools are designed for working with large xml-files.
<xml>cmp needs only a small amount of memory. So you can work with large files without frustrating try-and-error-tuning of parameters like java-heap-size and without choosing special algorithems for large files?
want to analyze xml-files
The <xml>cmp-tools are reading from stdin and writing on stdout. So you can use them in unix-pipelines. with this technique you can solve quickly complex analyzing-tasks.
want to implement regression-tests
For implementing regression-tests you have to compare the actual xml-output of your software with the specified condition. The xml<cmp>-compare-tool can do this for you. You can call it from the command-line and evaluate its exit-code or even integrate it into your software via the java-api.
Creating test-cases costs a lot of time and money. For <xml>cmp is highly configurable, you can adapt your regression-tests to new requirements in the software-lifecycle.
Xml-files often contain hierarchical data. With xslt or any-programming-technique you can easily process the xml-data along it's hierarchy.
But: If you want to process the data in an other hierarchical manner, than the data is structured in the xml-file, you have a lot of programming-work to do.
For example: The xml-file contains a list of persons and to every person a list of addresses. If you have the task to write a list, which contains all addresses and to every address a list of person, who live at this address, you will have to write a more complex program.
With the <xml>cmp-converting-tool you can regroup easily - without any programming work - such a xml-file in a xml-file, with a hierarchical structure, that meets exactly your needs. So you would convert with <xml>cmp the example-file in a file that contains a list of addresses and to every address a list of person. This new file can now be easily processed with a xslt-program.
<xml>cmp is not the right tool, if ..?
you only want to compare xhtml-files,
<xml>cmp can - of course - compare xhtml-data, but comparing xhtml is no the key competence of <xml>cmp.
<xml>cmp needs a basic-control-file, in which is defined, how the xml-data should be compared in detail. that means for example:
- Which elements/attributes should be compared.
- Which elements/attributes must have identical content.
- Which elements must have the same sequence.
- Which elements/attributes should be converted before comparison, because they are differently formatted.
- Which elements/attributes are not allowed.
- Which elements/attributes do identify a row.
Xhtml-files contain layout-oriented data, which has typically a very dynamic structure.
So for comparison of new xhtml-files you would need a new special basic-control-file. Of course you can generate through tool "xmlcmpcreate" this basic-control-file. But xhtml-files are not the ideal objects for <xml>cmp.