I am comparing two xml and I have to print the difference. How can I achieve this using LINQ. I know I can use XML diff patch by Microsoft but I prefer to use LINQ . If you have any other idea I will implement that
//First Xml
<Books>
<book>
<id="20504" image="C01" name="C# in Depth">
</book>
<book>
<id="20505" image="C02" name="ASP.NET">
</book>
<book>
<id="20506" image="C03" name="LINQ in Action ">
</book>
<book>
<id="20507" image="C04" name="Architecting Applications">
</book>
</Books>
//Second Xml
<Books>
<book>
<id="20504" image="C011" name="C# in Depth">
</book>
<book>
<id="20505" image="C02" name="ASP.NET 2.0">
</book>
<book>
<id="20506" image="C03" name="LINQ in Action ">
</book>
<book>
<id="20508" image="C04" name="Architecting Applications">
</book>
</Books>
I want to compare this two xml and print result like this.
Issued Issue Type IssueInFirst IssueInSecond
1 image is different C01 C011
2 name is different ASP.NET ASP.NET 2.0
3 id is different 20507 20508