Hi there,
is there already an “out of the box” XmlUnit solution for this problem: http://osdir.com/ml/java.xmlunit.general/2008-11/msg00002.html
I.e. ising the RecursiveElementNameAndTextQualifier (in combination with DifferenceConstants.ATTR_SEQUENCE_ID and DifferenceConstants.CHILD_NODELIST_SEQUENCE_ID) to compare two elements in wrong order and different attribute values, e.g.:
A)
<test>
<el att="b"/>
<el att="a"/>
</test>
B)
<test>
<el att="a"/>
<el att="b"/>
</test>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
is there already an “out of the box” XmlUnit solution for this problem: http://osdir.com/ml/java.xmlunit.general/2008-11/msg00002.html
I.e. ising the RecursiveElementNameAndTextQualifier (in combination with DifferenceConstants.ATTR_SEQUENCE_ID and DifferenceConstants.CHILD_NODELIST_SEQUENCE_ID) to compare two elements in wrong order and different attribute values, e.g.:
A)
<test>
<el att="b"/>
<el att="a"/>
</test>
B)
<test>
<el att="a"/>
<el att="b"/>
</test>
RecursiveElementNameAndTextQualifier hasn't changed and I don't expect it to change.
In your example you don't need matching on nested texts (and no recursion either) AFAICT. ElementNameAndAttributeQualifier should work just fine.