0

I'm interesting is there any library in Java to track changes in xml file. For example we have xml file

 <Package name="Pack3">
    <Process name="Process1"/>
    <Type name="Type1"/>
    <Type name="Type2"/>
  </Package>

then we delete/add tag (I.E. ) So we have this code.

<Package name="Pack3">
    <Process name="Process1"/>
    <Type name="Type2"/>
  </Package>

So i want to track this changes , like in mercurial/github/etc.

It's not hard to do own parser , but ...

Ghostleg
  • 161
  • 1
  • 2
  • 10

1 Answers1

1

Since XML is just a string, you can use some diff analogs like Apache commons difference (org.apache.commons.lang.StringUtils) or java-diff-utils. Find more on string diff here

Community
  • 1
  • 1
Ni Di
  • 26
  • 5