Package org.xmlunit.diff
Class ByNameAndTextRecSelector
java.lang.Object
org.xmlunit.diff.ByNameAndTextRecSelector
- All Implemented Interfaces:
ElementSelector
ElementSelector
that allows two elements to be compared if
their name (including namespace URI, if any) and textual content is
the same and the same is true for all child elements recursively.
This ElementSelector
helps with structures nested more
deeply but may need to be combined inside a conditionalSelector
in order
to be useful for the document as a whole.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeCompared
(Element controlElement, Element testElement) Determine whether the two elements from the control and test XML can be compared.
-
Constructor Details
-
ByNameAndTextRecSelector
public ByNameAndTextRecSelector()
-
-
Method Details
-
canBeCompared
Description copied from interface:ElementSelector
Determine whether the two elements from the control and test XML can be compared.- Specified by:
canBeCompared
in interfaceElementSelector
- Parameters:
controlElement
- element of the control XMLtestElement
- element of the test XML- Returns:
- true if the two elements can be compared
-