Class XPathHelper
java.lang.Object
org.htmlunit.html.xpath.XPathHelper
Collection of XPath utility methods.
- Author:
- Ahmed Ashour, Chuck Dumont, Ronald Brill
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T> getByXPath(DomNode node, String xpathExpr, org.htmlunit.xpath.xml.utils.PrefixResolver resolver) Evaluates an XPath expression from the specified node, returning the resultant nodes.static booleanReturns whether the thread is currently evaluating XPath expression or no.
-
Method Details
-
getByXPath
public static <T> List<T> getByXPath(DomNode node, String xpathExpr, org.htmlunit.xpath.xml.utils.PrefixResolver resolver) Evaluates an XPath expression from the specified node, returning the resultant nodes.- Type Parameters:
T- the type class- Parameters:
node- the node to start searching fromxpathExpr- the XPath expressionresolver- the prefix resolver to use for resolving namespace prefixes, or null- Returns:
- the list of objects found
-
isProcessingXPath
public static boolean isProcessingXPath()Returns whether the thread is currently evaluating XPath expression or no.- Returns:
- whether the thread is currently evaluating XPath expression or no
-