Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Comparison of XML files ignoring ordering of child elements

by RonW (Parson)
on Jan 24, 2019 at 00:16 UTC ( [id://1228895]=note: print w/replies, xml ) Need Help??


in reply to Comparison of XML files ignoring ordering of child elements

One of the method would be to convert XML into text and than comparing text files

FYI, XML is text. If you expect the 2 XML files to be ordered and formatted identically, a simple text diff will work just fine. If you need to allow for formatting differences, you could filter the XML files through a "shallow parser", for example XML::Parser::REX, then do a text diff on the resulting files. But, this will only "normalize" the formatting of the tags. The content of attribute values and any "bare text" in a container element is left "as is". Any format normalizing of that content is outside the scope of XML.

  • Comment on Re: Comparison of XML files ignoring ordering of child elements

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found