Dude - check out dom4J's NodeComparator class. It is really slick. He has implemented all of the gory details to do brute force compare. It's the only thing I've seen that does it all, and does it right.
It looks like great minds think alike... there's definitely a high degree of similarity between the two classes!
Anyhow: if it's the only class "that does it all", then please let me know what tests it has that DifferenceEngine is missing and I'll work them in. (In case you hadn't noticed the whole of XMLUnit is tested with JUnit classes...)
TIA,
Tim
PS: [the biased bit!] oh yes and XMLUnit works with any DOM tree and actually describes the differences it finds in user-friendly text, whereas NodeComparator only works with DOM4J and returns -1, 0 or 1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dude - check out dom4J's NodeComparator class. It is really slick. He has implemented all of the gory details to do brute force compare. It's the only thing I've seen that does it all, and does it right.
http://dom4j.org/apidocs/org/dom4j/util/NodeComparator.html
It looks like great minds think alike... there's definitely a high degree of similarity between the two classes!
Anyhow: if it's the only class "that does it all", then please let me know what tests it has that DifferenceEngine is missing and I'll work them in. (In case you hadn't noticed the whole of XMLUnit is tested with JUnit classes...)
TIA,
Tim
PS: [the biased bit!] oh yes and XMLUnit works with any DOM tree and actually describes the differences it finds in user-friendly text, whereas NodeComparator only works with DOM4J and returns -1, 0 or 1.