I was working on a project a while back and one of the requirement was to convert xml to json for one feed which was in xml format. We were using mongodb to store the feed so I was looking for a simple solution. I came across many libraries and finally used json.org
. Find here how to convert XML to JSON in Java.
Compare 2 XML in JAVA – Part 1
There are many ways to compare 2 XML in Java, however we will see here one of the process that I follow. I have split this in two seperate parts. The Part1 is about how to use the APIs in order to compare the XML and Part2 would explain how to utilize that and create a SWT/Eclipse RCP Application to visually represent the differences.