public class Matcher extends Object
Modifier and Type | Field and Description |
---|---|
static Matcher |
FAIL
State of a failed XPath evaluation, where nothing is matched.
|
Constructor and Description |
---|
Matcher() |
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 static final Matcher FAIL
public Matcher descend(String namespace, String name)
namespace
- element namespace or null
name
- element namepublic boolean matchesElement()
true
if the XPath expression matches
the element associated with this evaluation state.public boolean matchesAttribute(String namespace, String name)
true
if the XPath expression matches the named
attribute of the element associated with this evaluation state.namespace
- attribute namespace or null
name
- attribute namepublic boolean matchesText()
true
if the XPath expression matches all text
nodes whose parent is the element associated with this evaluation
state.Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.