Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Compare Heirarchy of 2 XML Files

From: "Kumar Velineni, Integra" <kumar.velineni@-------------.--->
To: <xml-dev@-----.---.--->
Date: 4/1/2008 3:13:00 PM
<span style='font-size:10.0pt;
font-family:Arial'>Dear Friend,<o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'>            I am having two XML files. I would like to
compare the hierarchy of elements & its attributes and throws the
difference in a error file. I don’t want to compare the content.
Heirarchy of elements in both the XML files should match.<o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'>Here is an example:<o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'>File 1:<o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><?xml version=”1.0”?><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><html><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><body><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><fm><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><p>This is a simple <st1:place w:st="on">Para</st1:place></p><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><list><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><li>This is a simple <st1:place w:st="on">Para</st1:place></li><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></list><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></fm><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></body><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></html><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'>File 2:<o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><?xml version=”1.0”?><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><html><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><body><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><fm lang=”es”><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><p>This is a <strong>simple</strong> <st1:place w:st="on">Para</st1:place></p><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><p>This is a simple <st1:place w:st="on">Para</st1:place></p><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></fm><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></body><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'></html><o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'>Difference between the 2 files are:<o:p></o:p>


 Strong tag with <p><o:p></o:p>
 <list> has been coded as
     <p><o:p></o:p>
 lang attribute added in
     <fm><o:p></o:p>


<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p>

<span style='font-size:10.0pt;
font-family:Arial'>Regards,<o:p></o:p>

<span style='font-size:10.0pt;
font-family:Arial'>Kumar V.<o:p></o:p>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent