DifferenceListener
interface compares two nodes and tells whether they're identical, similar, or different.
differenceFound
method is invoked for non-identical nodes
This is one way: we can say two different nodes are identical or similar; but we can't say two identical nodes aren't equal
Can't control the tree walking order or skip nodes completely
package org.custommonkey.xmlunit;
public interface DifferenceListener {
public final int RETURN_ACCEPT_DIFFERENCE = 0;
public final int RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL = 1;
public final int RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR = 2;
public int differenceFound(Difference difference);
public void skippedComparison(Node control, Node test);
}