Class XPathFactory

java.lang.Object
wt.util.xml.xpath.XPathFactory

public abstract class XPathFactory extends Object
Abstract factory interface for manufacturing XPath implementations.

Factory instances are created via one of the createNewFactoryInstance methods.

Supported API: true

Extendable: false

  • Method Details

    • createNewFactoryInstance

      public static final XPathFactory createNewFactoryInstance() throws FactoryCreationException
      Create a new factory instance of a default implementation.

      Supported API: true
      Returns:
      XPathFactory
      Throws:
      FactoryCreationException - if
      • the class is not found
      • the specified class does not extends this class
      • the class is not concrete (i.e. is an interface or declared as abstract
      • the class is not visible
      • the class has no visible, "no-arg" constructor
    • newXPath

      public abstract XPath newXPath(String x_path_expression) throws XPathException
      Create an XPath instance that can be used to locate nodes at the spectified path.

      See the documentation for XPath for an example of how to use XPaths for locating matches.

      Supported API: true

      Parameters:
      x_path_expression - the string representation of the path
      Returns:
      a non-null XPath instance
      Throws:
      XPathException - if there is a problem creating the instance such as a syntax error in the expression
      See Also: