Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Comparing XML files using Perl scriptby Willard B. Trophy (Hermit) |
on Jan 15, 2004 at 15:34 UTC ( [id://321580]=note: print w/replies, xml ) | Need Help?? |
A non-Perl solution: normalize both files using Bob Lyons's XSLT normalizer, then run your text diff tool of choice on the files.
Bob Lyons's code ensures that all whitespace is made equivalent, and sorts all attributes into alphabetical order. I've found this approach works well for small XML files, or files containing a few differences. --
In Section
Seekers of Perl Wisdom
|
|