Class XPathHelper

java.lang.Object
org.htmlunit.html.xpath.XPathHelper

public final class XPathHelper extends Object
Collection of XPath utility methods.
Author:
Ahmed Ashour, Chuck Dumont, Ronald Brill
  • 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 from
      xpathExpr - the XPath expression
      resolver - 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