none
Best way to compare multiple xml files using c# or XSLT RRS feed

  • Question

  • 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>
                  <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



    • Edited by coolram4u Monday, September 24, 2018 4:06 AM
    Saturday, September 22, 2018 6:29 AM

All replies