DOKK / manpages / debian 12 / xmldiff / xmldiff.1.en
xmldiff(1) Patch an XML file with an xmldiff xmldiff(1)

xmldiff - Create a diff for two XML files

xmldiff [-h] [-v] [-f {xml,diff,old}] [-w] [-p] [-F F]

[--unique-attributes [UNIQUE_ATTRIBUTES]]
[--ratio-mode {accurate,faster,fast}] [--fast-match]
file1 file2

xmldiff is a library and a command-line utility for making diffs out of XML. This may seem like something that doesn't need a dedicated utility, but change detection in hierarchical data is very different from change detection in flat data. XML type formats are also not only used for computer readable data, it is also often used as a format for hierarchical data that can be rendered into human readable formats. A traditional diff on such a format would tell you line by line the differences, but that would not be readable by a human. xmldiff provides tools to make human readable diffs in those situations.

Display help and exit.
Display version and exit.
Possible choices: xml, diff, old Formatter selection. Default: "diff"
Do not strip ignorable whitespace. Default: False
Try to make XML output more readable. Default: False
A value between 0 and 1 that determines how similar nodes must be to match.
A comma separated list of attributes that uniquely identify a node. Can be empty. Unique attributes for certain elements can be specified in the format {NS}element@attr. Default: "{http://www.w3.org/XML/1998/namespace}id"
Possible choices: accurate, faster, fast Choose the node comparison optimization. Default: "fast"
A faster, less optimal match run. Default: False

Common usage:


$ xmldiff file1.xml file2.xml
Making an output a bit more human readable by structuring it with whitespace:


$ xmldiff -f xml -p file1.xml file2.xml

xmlpatch(1).

xmldiff was written by Lennart Regebro <lregebro@shoobx.com> and Stephan Richter <srichter@shoobx.com>.

This manual page was written by Thiago Andrade Marques <thmarques@gmail.com> for the Debian project (but may be used by others).

04 Nov 2019 xmldiff-2.4