From: Stefan B. <bo...@ap...> - 2008-03-12 17:04:27
|
On Wed, 12 Mar 2008, Stefan Bodewig <bo...@ap...> wrote: On Tue, 11 Mar 2008, slowjoe <slo...@gm...> wrote: >> This time I try to disguise my proof of concept as a PDF file, >> which needs to be renamed to "xmlunit_issue.zip". > > I'll look into it later today. OK, I think you could simply replace MyElementQualifier with ElementNameAndAttribute qualifier passing in "id" to the single string arg constructor. Also, you can invoke DifferenceEngine#compare on the Documents directly since Document is-a Node and DifferenceEngine will do the right thing by traversing the tree from there. The remaining issue is that you somehow expect DifferenceEngine to ignore the comment or hand you two "no node found" Differences instead of one "found two nodes of different types". While you can't have the latter with XMLUnit (right now?), XMLUnit.getStripCommentsTransform might help with the first. Stefan |