logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

xmldiff - Create a diff for two XML files

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

xmldiff-2.4                                        04 Nov 2019                                        xmldiff(1)

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.

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

Name

xmldiff - Create a diff for two XML files

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

See Also

xmlpatch(1).

Synopsis

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

See Also