Package org.xmlunit.diff
Class ByNameAndTextRecSelector
- java.lang.Object
-
- org.xmlunit.diff.ByNameAndTextRecSelector
-
- All Implemented Interfaces:
ElementSelector
public class ByNameAndTextRecSelector extends Object implements ElementSelector
ElementSelectorthat 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
ElementSelectorhelps with structures nested more deeply but may need to be combined inside aconditionalSelectorin order to be useful for the document as a whole.
-
-
Constructor Summary
Constructors Constructor Description ByNameAndTextRecSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeCompared(Element controlElement, Element testElement)Determine whether the two elements from the control and test XML can be compared.
-
-
-
Method Detail
-
canBeCompared
public boolean canBeCompared(Element controlElement, Element testElement)
Description copied from interface:ElementSelectorDetermine whether the two elements from the control and test XML can be compared.- Specified by:
canBeComparedin interfaceElementSelector- Parameters:
controlElement- element of the control XMLtestElement- element of the test XML- Returns:
- true if the two elements can be compared
-
-