Compare two xml based on the tag as unique tag

I am developing application in which I have to compare 2 xml based on the IPADDRESS tag which is unique.

Ex: input1.xml





20.20.1.20

Device1





20.20.1.21

Device2





20.20.1.22

Device3





inpu2.xml





20.20.1.23

Device1





20.20.1.21

Device3





20.20.1.22

Device3





Result should be two xmls

output1 : ipadrees are present in input2.xml and not present in input.xml1





10.20.1.23

Device1





output2 : Remaining device list in input1.xml





10.20.1.20

Device1





10.20.1.21

Device2





10.20.1.22

Device3





I tried using XMLUNIT java api but not able to do as we should filter only based on IPAddress tag.Please help and thanks in advance....

Read More »

By: StackOverFlow - 7 days ago

Related Posts