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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdifferenceFound(Difference difference) Receive notification that 2 nodes are different.voidskippedComparison(Node control, Node test) Do nothing
-
Constructor Details
-
IgnoreTextAndAttributeValuesDifferenceListener
public IgnoreTextAndAttributeValuesDifferenceListener()
-
-
Method Details
-
differenceFound
Description copied from interface:DifferenceListenerReceive notification that 2 nodes are different.- Specified by:
differenceFoundin interfaceDifferenceListener- Parameters:
difference- a Difference instance as defined inDifferenceConstantsdescribing 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:
skippedComparisonin interfaceDifferenceListener- Parameters:
control- the control node being comparedtest- the test node being compared- See Also:
-