Package org.apache.tika.sax.xpath
Class NodeMatcher
- java.lang.Object
-
- org.apache.tika.sax.xpath.Matcher
-
- org.apache.tika.sax.xpath.NodeMatcher
-
public class NodeMatcher extends Matcher
Final evaluation state of a.../node()
XPath expression. Matches all elements, attributes, and text.
-
-
Constructor Summary
Constructors Constructor Description NodeMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matchesAttribute(java.lang.String namespace, java.lang.String name)
Returnstrue
if the XPath expression matches the named attribute of the element associated with this evaluation state.boolean
matchesElement()
Returnstrue
if the XPath expression matches the element associated with this evaluation state.boolean
matchesText()
Returnstrue
if the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.
-
-
-
Field Detail
-
INSTANCE
public static final Matcher INSTANCE
-
-
Method Detail
-
matchesElement
public boolean matchesElement()
Description copied from class:Matcher
Returnstrue
if the XPath expression matches the element associated with this evaluation state.- Overrides:
matchesElement
in classMatcher
- Returns:
- XPath evaluation state for this element
-
matchesAttribute
public boolean matchesAttribute(java.lang.String namespace, java.lang.String name)
Description copied from class:Matcher
Returnstrue
if the XPath expression matches the named attribute of the element associated with this evaluation state.- Overrides:
matchesAttribute
in classMatcher
- Parameters:
namespace
- attribute namespace ornull
name
- attribute name- Returns:
- XPath evaluation state for named attribute of this element
-
matchesText
public boolean matchesText()
Description copied from class:Matcher
Returnstrue
if the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.- Overrides:
matchesText
in classMatcher
- Returns:
- XPath evaluation state for text children of this element
-
-