From the XMLUnit web page:

For those of you who've got into it you'll know that test driven development is great. It gives you the confidence to change code safe in the knowledge that if something breaks you'll know about it. Except for those bits you don't know how to test. Until now XML has been one of them. Oh sure you can use "<stuff></stuff>".equals("<stuff></stuff>"); but is that really gonna work when some joker decides to output a <stuff/>? -- damned right it's not ;-)

XML can be used for just about anything so deciding if two documents are equal to each other isn't as easy as a character for character match. Sometimes

Stuff Stuff Stuff
Some More Stuff
Some More Stuff</more-stuff>
<stuff>Stuff Stuff Stuff</stuff>

and sometimes it doesn't... With XMLUnit you get the control, and you get to decide.

Previous | Next | Top | Cafe con Leche

Copyright 2005 Elliotte Rusty Harold
Last Modified August 17, 2005