With XMLUnit 2 how do you compare two documents without taking the element order into account?
I got this question for XMLUnit 1, but apparently the new API in v2 do
One difference that may need to become clearer in the 2.x documentation is the default ElementSelector
- roughly what used to be ElementQualifier
in 1.x. Where 1.x defaults to match elements by name, 2.x defaults to match elements in order. Maybe this is a bad idea.
Your Diff should work if you switch to matching on element names.
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName))