lxdiff — Show differences between two XML documents


lxdiff [ -j query ] [ -m ] input-file-1 input-file-2


lxdiff shows the differences between two XML documents. It uses rxp to normalize the documents and then uses the system diff program to compare them.

The input-file arguments may be URIs instead of filenames.


split elements onto separate lines to better localize differences. Since lxdiff uses the system diff program for comparison, the unit of difference is the line. For XML files containing very long lines, using -m may make the output easier to interpret. The "m" stands for "munge".

-j query

an XPath query specifying nodes to be removed from the documents before comparison. This allows unimportant differences to be ignored; for example "lxdiff -j @id" will ignore differences in id attributes between the documents. The "j" stands for "junk".