Click here to Skip to main content
15,881,092 members
Please Sign up or sign in to vote.
2.60/5 (3 votes)
See more:
Hello can anyone help me how to compare two XML files ad highlight the differences in files, I just want the output like below, can tell me any API's to use apart from XMLDiff

ActualFile :

<Human>
  <Legs>2</Legs>
  <Hands>2</<Hands>
  <Eyes>2</Eyes>
</Human>


Expected File:
<Human>
  <Legs>5</Legs>
  <Hands>2</<Hands>
 <Eyes>8</Eyes>
<Human>


What I have tried:

Tried with some C# code which couldn't help me, XML Diff wasnot helpful to me
Posted
Updated 26-Oct-18 4:11am

1 solution

You might want to give XMLUnit - Unit Testing XML for Java and .NET[^] a try.
You can not only compare files, but also implement very specific custom comparers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900