Package org.htmlunit.html
Class DomNodeUtil
java.lang.Object
org.htmlunit.html.DomNodeUtil
DomNode
helper methods.- Author:
- tom.fennelly@gmail.com
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> List<E>
selectNodes
(org.htmlunit.html.DomNode domNode, String xpathExpr) Evaluates an XPath expression from the specified node, returning the resultant nodes.static <X> X
selectSingleNode
(org.htmlunit.html.DomNode domNode, String xpathExpr) Evaluates the specified XPath expression from this node, returning the first matching element, ornull
if no node matches the specified XPath expression.
-
Constructor Details
-
DomNodeUtil
public DomNodeUtil()
-
-
Method Details
-
selectNodes
Evaluates an XPath expression from the specified node, returning the resultant nodes.Calls
WebClientUtil.waitForJSExec(WebClient)
before executing the query.- Parameters:
domNode
- the node to start searching fromxpathExpr
- the XPath expression- Returns:
- the list of objects found.
-
selectSingleNode
Evaluates the specified XPath expression from this node, returning the first matching element, ornull
if no node matches the specified XPath expression.Calls
WebClientUtil.waitForJSExec(WebClient)
before executing the query.- Parameters:
domNode
- the node to start searching fromxpathExpr
- the XPath expression- Returns:
- the first element matching the specified XPath expression
-