Package org.apache.tika.sax.xpath
Class SubtreeMatcher
java.lang.Object
org.apache.tika.sax.xpath.Matcher
org.apache.tika.sax.xpath.SubtreeMatcher
Evaluation state of a
...//...
XPath expression. Applies the
contained evaluation state to the current element and all its descendants.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the XPath evaluation state that results from descending to a child element with the given name.boolean
matchesAttribute
(String namespace, String name) Returnstrue
if the XPath expression matches the named attribute of the element associated with this evaluation state.boolean
Returnstrue
if the XPath expression matches the element associated with this evaluation state.boolean
Returnstrue
if the XPath expression matches all text nodes whose parent is the element associated with this evaluation state.
-
Constructor Details
-
SubtreeMatcher
-
-
Method Details
-
descend
Description copied from class:Matcher
Returns the XPath evaluation state that results from descending to a child element with the given name. -
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
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
-