mecrazycoder has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, Is there any best way to check given two XML files are same or not. Contents in two XML will be same but shuffled,say for example Input1.xml:
<Job> <Category>Engineer</Category> <Description>SystemsEngineer</Description> </JobId> <JobId> <Category>Cook</CategoryCode> <Description>Chef</Description> </JobId>
Input2.xml
<JobId> <Category>Cook</CategoryCode> <Description>Chef</Description> </JobId> <Job> <Category>Engineer</Category> <Description>SystemsEngineer</Description> </JobId>
Input1.xml and Input2.xml are same though content shuffled. Please help me

Replies are listed 'Best First'.
Re: XML files compare
by Anonymous Monk on Aug 17, 2009 at 12:13 UTC
    normalize (sort) first, then compare
A reply falls below the community's threshold of quality. You may see it by logging in.