I am comparing 2 xml files using xml diff dll.
I am unable to get the node name and the old value of the node like for example
file 1 :
File 1
<LastNameInfo>
<LNameNum>1</LNameNum>
</LastNameInfo>
File 2 :
<LastNameInfo>
<LNameNum> 5</LNameNum>
</LastNameInfo>
I even need to out put the node name in this example LnameNum and also the old value 1 can some one help??
so the way the XMLDiff ‘diffgram’ defines the differences is not based on ‘name’ but on node order, it enumerates them from the top down.
Take a look at the MSDN for more details
You can use the diffpatch tool to apply a diffgram to a particular XML, but also it does not mention explicitly the ‘old’ value in the diffgram. Its either a change to ‘newvalue’, or a remove node x, without specifying the contents.
It has the ability to output a HTML view that shows the old and new side by side with color highlighting- but if you are interested in doing something like producing a file that looks like this:
Or even just some console output like:
You are going to need to parse the XML Diffgram yourself along with your own file and basically find out that
Is referring to the node named LNameNum