xmldiff(1)

xmldiff - Create a diff for two XML files

Section 1 xmldiff bookworm source

Description

xmldiff

NAME

xmldiff - Create a diff for two XML files

SYNOPSIS

xmldiff [-h] [-v] [-f {xml,diff,old}] [-w] [-p] [-F F]
[--unique-attributes [UNIQUE_ATTRIBUTES]]
[--ratio-mode {accurate,faster,fast}] [--fast-match]
file1
file2

DESCRIPTION

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.

OPTIONS

-h, --help

Display help and exit.

-v, --version

Display version and exit.

-f, --formatter

Possible choices: xml, diff, old Formatter selection. Default: "diff"

-w, --keep-whitespace

Do not strip ignorable whitespace. Default: False

-p, --pretty-print

Try to make XML output more readable. Default: False

-F

A value between 0 and 1 that determines how similar nodes must be to match.

--unique-attributes

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"

--ratio-mode

Possible choices: accurate, faster, fast Choose the node comparison optimization. Default: "fast"

--fast-match

A faster, less optimal match run. Default: False

EXAMPLE

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

SEE ALSO

xmlpatch(1).

AUTHOR

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).