I have to XML Files ,say of format
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
Say i have 3 books category in XML one: BookCat1 BookCat2 BookCat3 & I have 4 Books Category in XML two: BookCat1 BookCat3 BookCat4 BookCat5
I have to first point out , Which categories were added or deleted ? Eg: Here BookCat2 was deleted and BookCat4 & 5 were added.
Then Later for sub elements i have to point out for every element in XML2 what sub elements were added or deleted.eg for XML2 say for BOOKCAT1 tag was added.
What would be the best way to achieve this ? I have to implement this using Java.