0

I have xyz.xml file in a path.

<xml>
  <emp>
    <name>rahul</name>
  <emp>
</xml>

I have a GUI from which I update the name rahul->rahul tripathi and click on save button and update the XML file.

Now updated XML file will be like --

<xml>
  <emp>
    <name>rahul tripathi</name>
  <emp>
</xml>

Now from GUI, I want to show the difference between previous and updated data which is stored in XML.

I found out a link, but regarding this there is no library.

Lucky
  • 16,787
  • 19
  • 117
  • 151
Rahul Tripathi
  • 545
  • 2
  • 7
  • 17
  • 1
    If _all_ the other formatting remains the same, then any old diff tool might be enough for what you need (q.v. [this tool](https://www.diffchecker.com/)). – Tim Biegeleisen Nov 03 '15 at 05:30

2 Answers2

1

Go through XmlUnit, with little bit of tweaking, could be the good solution.

Please explore this as well.

Also this and this.

Complete example here.

Community
  • 1
  • 1
Ankur Singhal
  • 26,012
  • 16
  • 82
  • 116
0

I used XmlUnit - http://www.xmlunit.org/ for this and it works great. Can ignore many more things than just whitespace.

Zbynek Vyskovsky - kvr000
  • 18,186
  • 3
  • 35
  • 43