Package org.custommonkey.xmlunit
Class ElementNameQualifier
- java.lang.Object
-
- org.custommonkey.xmlunit.ElementNameQualifier
-
- All Implemented Interfaces:
ElementQualifier
- Direct Known Subclasses:
ElementNameAndAttributeQualifier,ElementNameAndTextQualifier
public class ElementNameQualifier extends Object implements ElementQualifier
Simple interface implementation that tests two elements for name comparability. This class provides the default behaviour within a DifferenceEngine (for backwards compatibility)
-
-
Constructor Summary
Constructors Constructor Description ElementNameQualifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanequalsNamespace(Node control, Node test)Determine whether two nodes are defined by the same namespace URIprotected StringgetNonNamespacedNodeName(Node node)Strip any namespace information off a node namebooleanqualifyForComparison(Element control, Element test)Determine whether two elements qualify for further Difference comparison.
-
-
-
Method Detail
-
qualifyForComparison
public boolean qualifyForComparison(Element control, Element test)
Determine whether two elements qualify for further Difference comparison.- Specified by:
qualifyForComparisonin interfaceElementQualifier- Parameters:
control- an Element from the control XML NodeListtest- an Element from the test XML NodeList- Returns:
- true if the two elements qualify for further comparison based on their similar namespace URI and non-namespaced tag name, false otherwise
-
equalsNamespace
protected boolean equalsNamespace(Node control, Node test)
Determine whether two nodes are defined by the same namespace URI- Parameters:
control- control nodetest- test node- Returns:
- true if the two nodes are both defined by the same namespace URI (including the default - empty - namespace), false otherwise
-
-