Schoeib Amin - 2008-07-01

Hi,
I use XMLUnit for comparing XML's.
I have problems if the Diff-Type is ELEMENT_TAG_NAME_ID.
XMLUnit compares Elements with different names!

Example:

original-xml:

<A>
<B>
    <C>C</C>
    <D>D</D>
    <E>E</E>
    <F>F</F>
</B>
</A>

modified-xml:

<A>
<B>
    <C>C</C>
    <E>E</E> <!-- D is deleted -->
    <F>F</F>
    <G>G</G> <!-- G is inserted -->
</B>
</A>

output by XMLUnit:

Expected element tag name 'D' but was 'G' - comparing <D...> at /A[1]/B[1]/D[1] to <G...> at /A[1]/B[1]/G[1]

Expected text value 'D' but was 'G' - comparing <D ...>D</D> at /A[1]/B[1]/D[1]/text()[1] to <G ...>G</G> at /A[1]/B[1]/G[1]/text()[1]

Is there a way that XMLUnit report the changes in the following way:

- D is deleted
- G is inserted

Regards

Sammy