Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Comparing two XML files with XML::Simple using FOREACH and IF using

by anonymized user 468275 (Curate)
on Jan 14, 2016 at 14:26 UTC ( [id://1152761]=note: print w/replies, xml ) Need Help??


in reply to Comparing two XML files with XML::Simple using FOREACH and IF using

To compare XML sources requires a fair bit more than comparing the lines. The first approach that comes to mind is to load each file into a tree, using one of the treebuilding CPAN modules such as XML::Twig, then traversing the two trees to build e.g. a single hash of array where each hash value is an array of what is compared for a given tag. Then a second pass through that merged structure to do the actual comparison. (I can't be more specific about the comparison without knowing what is being compared).

One world, one people

  • Comment on Re: Comparing two XML files with XML::Simple using FOREACH and IF using

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-26 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found