public class JaxenXPathExecuter extends Object implements JRXPathExecuter
Modifier and Type | Class and Description |
---|---|
protected static class |
JaxenXPathExecuter.NodeListWrapper |
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_XPATH_COMPILATION_FAILURE |
static String |
EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE |
Constructor and Description |
---|
JaxenXPathExecuter() |
Modifier and Type | Method and Description |
---|---|
protected org.jaxen.XPath |
getXPath(String expression) |
NodeList |
selectNodeList(Node contextNode,
String expression)
Selects a node list by evaluating an XPath expression on a context node.
|
Object |
selectObject(Node contextNode,
String expression)
Selects an object by evaluating an XPath expression on a context node.
|
public static final String EXCEPTION_MESSAGE_KEY_XPATH_COMPILATION_FAILURE
public static final String EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE
protected org.jaxen.XPath getXPath(String expression) throws JRException
JRException
public NodeList selectNodeList(Node contextNode, String expression) throws JRException
JRXPathExecuter
selectNodeList
in interface JRXPathExecuter
contextNode
- the context node (a document can also be used)expression
- the XPath expressionJRException
- if the XPath evaluation failedpublic Object selectObject(Node contextNode, String expression) throws JRException
JRXPathExecuter
java.lang.String
, java.lang.Number
or java.lang.Boolean
.selectObject
in interface JRXPathExecuter
contextNode
- the context node (a document can also be used)expression
- the XPath expressionJRException
- if the XPath evaluation failedCopyright © 2017. All rights reserved.