Has anybody figured a way to skip a node and all its children from comparison ? Let's say I have in both doc an element with same name but that I don't want to compare their children nodes...Is that possible with xmlunit ? It seems to me that the ElementQualifier just allows to skip a comparison...Actually, its behavior appears quite weird to me and the doc is not saying much about it... What does skipping a comparison really mean ? Do we move forward in both documents (control and test) or only in one of them ? Wouldn't it make sense when skipping an element to skip all its children ?
Thank you for any help.
Regards,
G.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has anybody figured a way to skip a node and all its children from comparison ? Let's say I have in both doc an element with same name but that I don't want to compare their children nodes...Is that possible with xmlunit ? It seems to me that the ElementQualifier just allows to skip a comparison...Actually, its behavior appears quite weird to me and the doc is not saying much about it... What does skipping a comparison really mean ? Do we move forward in both documents (control and test) or only in one of them ? Wouldn't it make sense when skipping an element to skip all its children ?
Thank you for any help.
Regards,
G.
Could you not use xpath to trim the tree to only show the bit's you want to check?
Thx Jeff for your suggestion. That would surely be a way...I was looking for smth more integrated with xmlunit though...
* Excluding Elements and Attributes with XPath
http://www.haenchen.softwarezentrum.de/OpenSourceWiki/Wiki.jsp?page=XMLUnitExtensions
its an wiki, just add your comments there