xmldiff(1)

xmldiff1

Create a diff for two xml files

Usage

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

file1 file2

Overview

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

Examples

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

Releases

11 releases since Debian 3.1 (Sarge); the text changed 3 times.

  1. 3.1–4.0
  2. 5.0–6.0
  3. 7–10
  4. 11–13

--fast-match since Debian 11 (Bullseye); --formatter since Debian 11 (Bullseye); --keep-whitespace since Debian 11 (Bullseye); --pretty-print since Debian 11 (Bullseye); --ratio-mode since Debian 11 (Bullseye); --unique-attributes since Debian 11 (Bullseye); -F since Debian 11 (Bullseye); -f since Debian 11 (Bullseye); -v since Debian 11 (Bullseye); -w since Debian 11 (Bullseye).

--encoding until Debian 10 (Buster); --exclude-comments until Debian 10 (Buster); --ext-ges until Debian 10 (Buster); --ext-pes until Debian 10 (Buster); --html until Debian 10 (Buster); --not-normalize-spaces until Debian 10 (Buster); --profile until Debian 10 (Buster); --recursive until Debian 10 (Buster); --xupdate until Debian 10 (Buster); -H until Debian 10 (Buster); -V until Debian 10 (Buster); -c until Debian 10 (Buster); -e until Debian 10 (Buster); -g until Debian 10 (Buster); -n until Debian 10 (Buster); -r until Debian 10 (Buster); -x until Debian 10 (Buster).

Author

xmldiff was written by Lennart Regebro <[email protected]> and Stephan Richter <[email protected]>.

This manual page was written by Thiago Andrade Marques <[email protected]> for the Debian project (but may be used by others).

From xmldiff 2.6.3-0.2 in Debian 13 (Trixie). Parsed by carta from the page's man source.