Package org.custommonkey.xmlunit
Class IgnoreTextAndAttributeValuesDifferenceListener
java.lang.Object
org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener
- All Implemented Interfaces:
DifferenceListener
public class IgnoreTextAndAttributeValuesDifferenceListener
extends Object
implements DifferenceListener
Class to use when performing a Diff that only compares the
structure of 2 pieces of XML, i.e. where the values of text
and attribute nodes should be ignored.
-
Field Summary
Fields inherited from interface org.custommonkey.xmlunit.DifferenceListener
RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
differenceFound
(Difference difference) Receive notification that 2 nodes are different.void
skippedComparison
(Node control, Node test) Do nothing
-
Constructor Details
-
IgnoreTextAndAttributeValuesDifferenceListener
public IgnoreTextAndAttributeValuesDifferenceListener()
-
-
Method Details
-
differenceFound
Description copied from interface:DifferenceListener
Receive notification that 2 nodes are different.- Specified by:
differenceFound
in interfaceDifferenceListener
- Parameters:
difference
- a Difference instance as defined inDifferenceConstants
describing the cause of the difference and containing the detail of the nodes that differ- Returns:
- RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR to ignore differences in values of TEXT or ATTRIBUTE nodes, and RETURN_ACCEPT_DIFFERENCE to accept all other differences.
- See Also:
-
skippedComparison
Do nothing- Specified by:
skippedComparison
in interfaceDifferenceListener
- Parameters:
control
- the control node being comparedtest
- the test node being compared- See Also:
-