Interface JRXPathExecuter
-
- All Known Implementing Classes:
JaxenNsAwareXPathExecuter,JaxenXPathExecuter
public interface JRXPathExecuterAn XPath expression executer.XML data sourcesdelegate XPath executions to implementations of this interface.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
JRXPathExecuterFactory,JRXPathExecuterUtils
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.w3c.dom.NodeListselectNodeList(org.w3c.dom.Node contextNode, java.lang.String expression)Selects a node list by evaluating an XPath expression on a context node.java.lang.ObjectselectObject(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 JRExceptionSelects 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 JRExceptionSelects 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.Numberorjava.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
-
-