I have XML in the following format:
<Root>
<Elem1>
<SubElem1>A</SubElem1>
...
</Elem1>
<Elem1>
<SubElem1>B</SubElem1>
...
</Elem1>
<Elem2>
...
</Elem2>
...
</Root>
I want to instruct XmlUnit's diff engine to ignore the order of ElemN elements, but only within their "group".
E.g.:
- If the second and the first Elem1 in the previous example would change order => equal
- If the Elem2 would become before Elem1 or in the middle of Elem1 => difference
Is there a way to achieve this result?