public class SubtreeMatcher extends Matcher
...//... XPath expression. Applies the
contained evaluation state to the current element and all its descendants.| Constructor and Description |
|---|
SubtreeMatcher(Matcher then) |
| Modifier and Type | Method and Description |
|---|---|
Matcher |
descend(String namespace,
String name)
Returns the XPath evaluation state that results from descending
to a child element with the given name.
|
boolean |
matchesAttribute(String namespace,
String name)
Returns
true if the XPath expression matches the named
attribute of the element associated with this evaluation state. |
boolean |
matchesElement()
Returns
true if the XPath expression matches
the element associated with this evaluation state. |
boolean |
matchesText()
Returns
true if the XPath expression matches all text
nodes whose parent is the element associated with this evaluation
state. |
public SubtreeMatcher(Matcher then)
public Matcher descend(String namespace, String name)
Matcherpublic boolean matchesElement()
Matchertrue if the XPath expression matches
the element associated with this evaluation state.matchesElement in class Matcherpublic boolean matchesAttribute(String namespace, String name)
Matchertrue if the XPath expression matches the named
attribute of the element associated with this evaluation state.matchesAttribute in class Matchernamespace - attribute namespace or nullname - attribute namepublic boolean matchesText()
Matchertrue if the XPath expression matches all text
nodes whose parent is the element associated with this evaluation
state.matchesText in class MatcherCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.