Class Jaxp13XpathEngine

java.lang.Object
org.custommonkey.xmlunit.jaxp13.Jaxp13XpathEngine
All Implemented Interfaces:
XpathEngine

public class Jaxp13XpathEngine extends Object implements XpathEngine
XPath engine based on javax.xml.xpath.
  • Constructor Details

  • Method Details

    • getMatchingNodes

      public NodeList getMatchingNodes(String select, Document document) throws XpathException
      Execute the specified xpath syntax select expression on the specified document and return the list of nodes (could have length zero) that match
      Specified by:
      getMatchingNodes in interface XpathEngine
      Parameters:
      select - the XPath expression
      document - the XML source to apply the expression to
      Returns:
      matching nodes
      Throws:
      XpathException - if the underlying implementation does
    • evaluate

      public String evaluate(String select, Document document) throws XpathException
      Evaluate the result of executing the specified xpath syntax select expression on the specified document
      Specified by:
      evaluate in interface XpathEngine
      Parameters:
      select - the XPath expression
      document - the XML source to apply the expression to
      Returns:
      evaluated result
      Throws:
      XpathException - if the underlying implementation does
    • setNamespaceContext

      public void setNamespaceContext(NamespaceContext ctx)
      Description copied from interface: XpathEngine
      Establish a namespace context.
      Specified by:
      setNamespaceContext in interface XpathEngine
      Parameters:
      ctx - the NamespaceContext