public class ByNameAndTextRecSelector extends java.lang.Object implements 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 and Description |
---|
ByNameAndTextRecSelector() |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeCompared(org.w3c.dom.Element controlElement,
org.w3c.dom.Element testElement)
Determine whether the two elements from the control and test
XML can be compared.
|
private static java.util.Map.Entry<java.lang.Integer,org.w3c.dom.Node> |
findNonText(org.w3c.dom.NodeList nl,
int current,
int len) |
private static boolean |
isText(org.w3c.dom.Node n) |
public boolean canBeCompared(org.w3c.dom.Element controlElement, org.w3c.dom.Element testElement)
ElementSelector
canBeCompared
in interface ElementSelector
private static java.util.Map.Entry<java.lang.Integer,org.w3c.dom.Node> findNonText(org.w3c.dom.NodeList nl, int current, int len)
private static boolean isText(org.w3c.dom.Node n)