DiffX Usage
Overview
To invoke Diff-x from the command-line to compare two file, you can simply use the java -jar diffx-xx.jar command followed by the options below:
Main [options] xml_file1 xml_file2 where xml_file1 = Path to the new XML file xml_file2 = Path to the old XML file options: -profile Display profiling info -noslice Do not use slicing -o [output] The output file -L [loader] Choose a specific loader sax* | dom | text -A [algo] Choose a specific algorithm fitsy* | guano | fitopsy | kumar | wesyma -F [format] Choose a specific formatter smart* | basic | convenient | strict | short -W [wsp] Define whitespace processing preserve* | compare | ignore -G [granul] Define text diffing granularity word* | text | character * indicates option used by default.
Basic options
Option -o [output]
By default, Diff-X sends the diffing results to the standard output. Use this option to specify in which file the diffing result should be stored. [output] should be a filename.
Option -L [loader
]
Choose a specific loader, to creates the sequence of events:
- Use sax to use a SAX parser (faster, but will ignore XML comments)
- Use dom to use the W3C DOM
- Use text to perform a simple text comparison
Option -W [wsp]
Define whitespace processing.
- preserve White spaces are preserved for formatting but ignored during diffing.
- compare White spaces are preserved for formatting and white space differences are reported (slow)
- ignore white spaces are completely ignored and the result may produce different white spaces (faster)
Option -G [granul]
Use this option to defines the granularity text diffing.
- word reports differences at the word level
- text reports differences at the text node level (faster)
- character reports differences at the character level (slow)
Advanced options
Option -profile
Displays some profiling information on the error output
Option -noslice
Prevents Diff-X from "slicing" the XML. Diff-X uses slicing to remove common subsequences at the beginning and at the end of the sequence of XML events.
Option -A [algo]
Choose a specific algorithm implementation to use. Use this option to test your own algorithm - these option values may change in the future. Must be one of fitsy* | guano | fitopsy | kumar | wesyma
Option -F [format]
Choose a specific formatter. Must be one of smart* | basic | convenient | strict | short
Created on , last edited on