Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Comparing XML files using Perl script

by Willard B. Trophy (Hermit)
on Jan 15, 2004 at 15:34 UTC ( [id://321580]=note: print w/replies, xml ) Need Help??


in reply to Comparing XML files using Perl script

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.

--
bowling trophy thieves, die!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://321580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-29 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found