Class JaxenXPathExecuter
java.lang.Object
net.sf.jasperreports.jaxen.util.xml.JaxenXPathExecuter
- All Implemented Interfaces:
JRXPathExecuter
- Direct Known Subclasses:
JaxenNsAwareXPathExecuter
XPath executer implementation that uses Jaxen.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.jaxen.XPath
selectNodeList
(Node contextNode, String expression) Selects a node list by evaluating an XPath expression on a context node.selectObject
(Node contextNode, String expression) Selects an object by evaluating an XPath expression on a context node.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_XPATH_COMPILATION_FAILURE
- See Also:
-
EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE
- See Also:
-
-
Constructor Details
-
JaxenXPathExecuter
public JaxenXPathExecuter()
-
-
Method Details
-
getXPath
- Throws:
JRException
-
selectNodeList
Description copied from interface:JRXPathExecuter
Selects a node list by evaluating an XPath expression on a context node.- Specified by:
selectNodeList
in interfaceJRXPathExecuter
- 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
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 ajava.lang.String
,java.lang.Number
orjava.lang.Boolean
.- Specified by:
selectObject
in interfaceJRXPathExecuter
- 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
-