| Author |
Compare Two DOM Objects
|
Rajesh Savitri
Greenhorn
Joined: Sep 13, 2002
Posts: 21
|
|
Hi, I have two Dom objects from two different xml docs. Both the xml docs are of same Schema. But the contents of the two objects could be Same/Diff/Node might be in diff order. I need to compare these two objects and identify if they are same or diff. Can Some one tell me the best approach for this. eg: <root> <node1/> <node2/> </root> <root> <node2/> <node1/> </root> Even though the nodes 1 and 2 are in diff order the data are similar in these two xml docs. So when I compare the result shd be "Both xml docs are equal"
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
I think you should check if <XmlUnit/> would have a suitable API for your needs.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Rajesh Savitri
Greenhorn
Joined: Sep 13, 2002
Posts: 21
|
|
|
Thanks a lot...
|
 |
 |
|
|
subject: Compare Two DOM Objects
|
|
|