public class NodeMatcher extends Matcher
.../node()
XPath expression.
Matches all elements, attributes, and text.Constructor and Description |
---|
NodeMatcher() |
Modifier and Type | Method and Description |
---|---|
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 static final Matcher INSTANCE
public boolean matchesElement()
Matcher
true
if the XPath expression matches
the element associated with this evaluation state.matchesElement
in class Matcher
public boolean matchesAttribute(String namespace, String name)
Matcher
true
if the XPath expression matches the named
attribute of the element associated with this evaluation state.matchesAttribute
in class Matcher
namespace
- attribute namespace or null
name
- attribute namepublic boolean matchesText()
Matcher
true
if the XPath expression matches all text
nodes whose parent is the element associated with this evaluation
state.matchesText
in class Matcher
Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.