Package org.custommonkey.xmlunit
Class IgnoreTextAndAttributeValuesDifferenceListener
- java.lang.Object
-
- org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener
-
- All Implemented Interfaces:
DifferenceListener
public class IgnoreTextAndAttributeValuesDifferenceListener extends java.lang.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 Modifier and Type Field Description private static int[]
IGNORE_VALUES
-
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 Constructor Description IgnoreTextAndAttributeValuesDifferenceListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
differenceFound(Difference difference)
Receive notification that 2 nodes are different.private boolean
isIgnoredDifference(Difference difference)
void
skippedComparison(org.w3c.dom.Node control, org.w3c.dom.Node test)
Do nothing
-
-
-
Method Detail
-
isIgnoredDifference
private boolean isIgnoredDifference(Difference difference)
-
differenceFound
public int differenceFound(Difference difference)
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:
DifferenceListener.differenceFound(Difference)
-
skippedComparison
public void skippedComparison(org.w3c.dom.Node control, org.w3c.dom.Node test)
Do nothing- Specified by:
skippedComparison
in interfaceDifferenceListener
- Parameters:
control
- the control node being comparedtest
- the test node being compared- See Also:
DifferenceListener.skippedComparison(Node, Node)
-
-