net.sf.jasperreports.engine.util.xml

## Class JaxenXPathExecuter

- java.lang.Object
- - net.sf.jasperreports.engine.util.xml.JaxenXPathExecuter

- All Implemented Interfaces:
    JRXPathExecuter
  Direct Known Subclasses:
    JaxenNsAwareXPathExecuter

      public class JaxenXPathExecuter
      extends java.lang.Object
      implements JRXPathExecuter

  XPath executer implementation that uses Jaxen.
  Version:
    $Id: JaxenXPathExecuter.java 6863 2014-02-06 09:59:27Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `JaxenXPathExecuter.NodeListWrapper`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JaxenXPathExecuter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.jaxen.XPath` | `getXPath(java.lang.String expression)`
    `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.

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

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

- - ### Constructor Detail

    - #### JaxenXPathExecuter

          public JaxenXPathExecuter()

  - ### Method Detail

    - #### getXPath

          protected org.jaxen.XPath getXPath(java.lang.String expression)
                                      throws JRException

      Throws:
        `JRException`

    - #### selectNodeList

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

      Description copied from interface: `JRXPathExecuter`
      Selects a node list by evaluating an XPath expression on a context node.
      Specified by:
        `selectNodeList` in interface `JRXPathExecuter`
      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

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

      Description copied from interface: `JRXPathExecuter`
      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`.
      Specified by:
        `selectObject` in interface `JRXPathExecuter`
      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