On Fri, 4 May 2007, Anamika Majumder <[EMAIL PROTECTED]> wrote: > Stephan - I have another question. I am trying to compare two xml > documents but would like to Skip the comparison in a few of those > nodes (e.g the documents should be treated as identical even if two > elements 'foo' and 'bar' are different in the two). > > I see in the examples, that we could implement the > DifferenceListener,
Yes, I was about to recommend that. > but it seems like then the documents would be treated as > similar/identical even if nodes other than 'foo' and 'bar' are > different. Why? You will have to be more specific in your DifferenceListener implementation and only return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL if the Difference is one between foo and bar elements. In any other case return RETURN_ACCEPT_DIFFERENCE. > Is there a way so that I can specify using xpaths, that I would like > to skip comparison of just foo and bar. No, unfortunately there is not. Stefan ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Xmlunit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xmlunit-general
