Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Use XSLT to compare multiple xml and list the differences in another xml file

$
0
0
Hello experts,
i wanted to know how to compare two xml files using  C# or xslt and display another xml file only 
with the differences in the xml file:

xml1:
<ORDERS><ORDER><ORDERNUM>979793524</ORDERNUM><TIES><TIE><TIENUMBER>1</TIENUMBER><ITEMS><ITEM><ITEMNUMBER>KF3P2</ITEMNUMBER><ITEMQTY>1</ITEMQTY></ITEM><ITEM><ITEMNUMBER>60RD2</ITEMNUMBER><ITEMQTY>1</ITEMQTY></ITEM></ITEMS></TIE></TIES></ORDER><ORDER><ORDERNUM>979794834</ORDERNUM><TIES><TIE><TIENUMBER>1</TIENUMBER><ITEMS><ITEM><ITEMNUMBER>K850M</ITEMNUMBER><ITEMQTY>1</ITEMQTY></ITEM><ITEM><ITEMNUMBER>T732H</ITEMNUMBER><ITEMQTY>1</ITEMQTY></ITEM></ITEMS></TIE></TIES></ORDER></ORDERS>



XML2:
<ORDERS><ORDER><ORDERNUM>979794834</ORDERNUM><TIES><TIE><TIENUMBER>1</TIENUMBER><ITEMS><ITEM><ITEMNUMBER>T732H</ITEMNUMBER><ITEMQTY>1</ITEMQTY></ITEM><ITEM><ITEMNUMBER>K850M</ITEMNUMBER><ITEMQTY>10</ITEMQTY></ITEM></ITEMS></TIE></TIES></ORDER><ORDER><ORDERNUM>979793524</ORDERNUM><TIES><TIE><TIENUMBER>1</TIENUMBER><TIEQTY>1</TIEQTY><ITEMS><ITEM><ITEMNUMBER>60RD2</ITEMNUMBER><ITEMQTY>1</ITEMQTY></ITEM><ITEM><ITEMNUMBER>KF3P2</ITEMNUMBER><ITEMQTY>25</ITEMQTY></ITEM></ITEMS></TIE></TIES></ORDER></ORDERS>


  
 
Expected Output:
 
 
<ORDERNUM>979793524</ORDERNUM><ITEMNUMBER>KF3P2</ITEMNUMBER><ITEMQTY>25</ITEMQTY><ORDERNUM>979794834</ORDERNUM><<ITEMNUMBER>K850M</ITEMNUMBER><ITEMQTY>10</ITEMQTY>


   

ram


ram


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>