net.sf.jasperreports.engine.util.xml

## Interface JRXPathExecuter

- All Known Implementing Classes:
    JaxenNsAwareXPathExecuter, JaxenXPathExecuter, XalanNsAwareXPathExecuter, XalanXPathExecuter

      public interface JRXPathExecuter

  An XPath expression executer.

  `XML data sources` delegate XPath executions to implementations of this interface.
  Version:
    $Id: JRXPathExecuter.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
  See Also:
    `JRXPathExecuterFactory`, `JRXPathExecuterUtils`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.w3c.dom.NodeList` | `selectNodeList(org.w3c.dom.Node contextNode, java.lang.String expression)` Selects a node list by evaluating an XPath expression on a context node.
    `java.lang.Object` | `selectObject(org.w3c.dom.Node contextNode, java.lang.String expression)` Selects an object by evaluating an XPath expression on a context node.

- - ### Method Detail

    - #### selectNodeList

          org.w3c.dom.NodeList selectNodeList(org.w3c.dom.Node contextNode,
                                            java.lang.String expression)
                                              throws JRException

      Selects a node list by evaluating an XPath expression on a context node.
      Parameters:
        `contextNode` - the context node (a document can also be used)
        `expression` - the XPath expression
      Returns:
        the selected node list
      Throws:
        `JRException` - if the XPath evaluation failed

    - #### selectObject

          java.lang.Object selectObject(org.w3c.dom.Node contextNode,
                                      java.lang.String expression)
                                        throws JRException

      Selects an object by evaluating an XPath expression on a context node.

      If the expression evaluates to a node list, the first node in the list should be returned. Otherwise, the primitive value resulted from the evaluation should be returned as a `java.lang.String`, `java.lang.Number` or `java.lang.Boolean`.
      Parameters:
        `contextNode` - the context node (a document can also be used)
        `expression` - the XPath expression
      Returns:
        the selected node or value
      Throws:
        `JRException` - if the XPath evaluation failed

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com