Does anyone have a good tool for comparing two XML files and generating
a list of substantive differences? It should be XML-aware enough to (at
least optionally) normalize whitespace differences so as not to produce
false positives when the only change is line reformatting.
Spending some time with Google turned up several "xmldiff" programs, none
of which quite fits the bill:
1. XMLdiff, a Python program (http://www.logilab.org/xmldiff/) that
generates output in an XPath format that's not human-readable, nor
does it ignore whitespace differences;
2. A Perl "xmldiff" from DecisionSoft
(http://software.decisionsoft.com/tools.html), which produces a nice
color diff output, but reports whitespace differences;
4. A 90-day trial of a Java XML Diff from IBM
(http://www.alphaworks.ibm.com/tech/xmldiffmerge) that also
seems to report whitespace differences;
3. A Microsoft XML Diff program demo
(http://apps.gotdotnet.com/xmltools/xmldiff/) that produces
precisely the desired output, but apparently has an input file length
limitation of 100K and is downloadable only as class files that need
to be plugged into wrapper programs that we may or may not be able
to figure out how to create.
Basically, I need to use a difference generator for two editorial tasks:
(1) check for substantive changes to both elements and attributes in two
versions of a file; (2) verify that when an XML file is reformatted
to be readable (e.g. by applying a "tidy" program to a source file
lacking line breaks), the formatter does not change anything meaningful.
If anyone is using a tool that does this I'd be grateful to hear about
it.
David
--
David Sewell, Managing Editor
Electronic Imprint, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: [log in to unmask] Tel: +1 434 924 9973
Web: http://www.ei.virginia.edu/
|