what you see is what the XML parser hands to XMLUnit.
& inside a CDATA section is not an entity that gets expanded, it remains a literal & - and so
<![CDATA['s]]> is quite different from a single quote. Your two CDATA section really are not identical or the same or anywhere close to it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a question regarding CDATA comparisson.
I'm trying to compare these two texts, which are inside CDATA elements in my xml.
'My test page's title'
'My test page's title'
XMLUnit gives
[different] Expected text value 'My test page's title' but was 'My test page's title' - comparing
I have set
XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true);
XMLUnit.setExpandEntityReferences(true);
but nothing happened,
is there any way to try these two texts as equals?
Thanks
Hernan
what you see is what the XML parser hands to XMLUnit.
& inside a CDATA section is not an entity that gets expanded, it remains a literal & - and so
<![CDATA['s]]> is quite different from a single quote. Your two CDATA section really are not identical or the same or anywhere close to it.