Class JaxenNsAwareXPathExecuter
java.lang.Object
net.sf.jasperreports.jaxen.util.xml.JaxenXPathExecuter
net.sf.jasperreports.jaxen.util.xml.JaxenNsAwareXPathExecuter
- All Implemented Interfaces:
JRXPathExecuter
XPath executer implementation that uses a namespace aware Jaxen.
- Author:
- Narcis Marcu (narcism@users.sourceforge.net)
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.jasperreports.jaxen.util.xml.JaxenXPathExecuter
JaxenXPathExecuter.NodeListWrapper -
Field Summary
Fields inherited from class net.sf.jasperreports.jaxen.util.xml.JaxenXPathExecuter
EXCEPTION_MESSAGE_KEY_XPATH_COMPILATION_FAILURE, EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddNamespaceContext(Node contextNode, org.jaxen.XPath xPath, String expression) protected booleancontainsPrefixes(String expression) booleanprotected org.jaxen.XPathselectNodeList(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.voidsetDetectXmlNamespaces(boolean detectXmlNamespaces) voidsetXmlNamespaceMap(Map<String, String> xmlNamespaceMap) Methods inherited from class net.sf.jasperreports.jaxen.util.xml.JaxenXPathExecuter
getXPath
-
Constructor Details
-
JaxenNsAwareXPathExecuter
public JaxenNsAwareXPathExecuter()Default constructor.
-
-
Method Details
-
getXmlNamespaceMap
-
setXmlNamespaceMap
- Throws:
JRException
-
getDetectXmlNamespaces
public boolean getDetectXmlNamespaces() -
setDetectXmlNamespaces
public void setDetectXmlNamespaces(boolean detectXmlNamespaces) -
getXPath
- Throws:
JRException
-
selectNodeList
Description copied from interface:JRXPathExecuterSelects a node list by evaluating an XPath expression on a context node.- Specified by:
selectNodeListin interfaceJRXPathExecuter- Overrides:
selectNodeListin classJaxenXPathExecuter- 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:JRXPathExecuterSelects 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.- Specified by:
selectObjectin interfaceJRXPathExecuter- Overrides:
selectObjectin classJaxenXPathExecuter- 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
-
containsPrefixes
-
addNamespaceContext
protected void addNamespaceContext(Node contextNode, org.jaxen.XPath xPath, String expression) throws JRException - Throws:
JRException
-