SaxonXPath (xmlbeans API)

org.apache.xmlbeans.impl.xpath.saxon

## Class SaxonXPath

- java.lang.Object
- - org.apache.xmlbeans.impl.xpath.saxon.SaxonXPath

- All Implemented Interfaces:
    Path

      public class SaxonXPath
      extends Object
      implements Path

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SaxonXPath(String path, String contextVar, Map<String,String> namespaceMap)` Construct given an XPath expression string.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `XPathEngine` | `execute(Cur c, XmlOptions options)`
    `List` | `selectNodes(Object node)` Select all nodes that are selectable by this XPath expression.
    `List` | `selectPath(Object node)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SaxonXPath

          public SaxonXPath(String path,
                            String contextVar,
                            Map<String,String> namespaceMap)

      Construct given an XPath expression string.
      Parameters:
        `path` - The XPath expression
        `contextVar` - The name of the context variable
        `namespaceMap` - a map of prefix/uri bindings for NS support

  - ### Method Detail

    - #### execute

          public XPathEngine execute(Cur c,
                                     XmlOptions options)

      Specified by:
        `execute` in interface `Path`

    - #### selectNodes

          public List selectNodes(Object node)

      Select all nodes that are selectable by this XPath expression. If multiple nodes match, multiple nodes will be returned.

      NOTE: In most cases, nodes will be returned in document-order, as defined by the XML Canonicalization specification. The exception occurs when using XPath expressions involving the `union` operator (denoted with the pipe '|' character).

      NOTE: Param node must be a DOM node which will be used during the xpath execution and iteration through the results. A call of node.dispose() must be done after reading all results.

      Parameters:
        `node` - The node, nodeset or Context object for evaluation. This value can be null.
      Returns:
        The `List` of all items selected by this XPath expression.

    - #### selectPath

          public List selectPath(Object node)