public class JaxenNsAwareXPathExecuter extends JaxenXPathExecuter
JaxenXPathExecuter.NodeListWrapper
EXCEPTION_MESSAGE_KEY_XPATH_COMPILATION_FAILURE, EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE
Constructor and Description |
---|
JaxenNsAwareXPathExecuter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addNamespaceContext(org.w3c.dom.Node contextNode,
XPath xPath,
java.lang.String expression) |
protected boolean |
containsPrefixes(java.lang.String expression) |
boolean |
getDetectXmlNamespaces() |
java.util.Map<java.lang.String,java.lang.String> |
getXmlNamespaceMap() |
protected XPath |
getXPath(org.w3c.dom.Node contextNode,
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.
|
void |
setDetectXmlNamespaces(boolean detectXmlNamespaces) |
void |
setXmlNamespaceMap(java.util.Map<java.lang.String,java.lang.String> xmlNamespaceMap) |
getXPath
public JaxenNsAwareXPathExecuter()
public java.util.Map<java.lang.String,java.lang.String> getXmlNamespaceMap()
public void setXmlNamespaceMap(java.util.Map<java.lang.String,java.lang.String> xmlNamespaceMap) throws JRException
JRException
public boolean getDetectXmlNamespaces()
public void setDetectXmlNamespaces(boolean detectXmlNamespaces)
protected XPath getXPath(org.w3c.dom.Node contextNode, java.lang.String expression) throws JRException
JRException
public org.w3c.dom.NodeList selectNodeList(org.w3c.dom.Node contextNode, java.lang.String expression) throws JRException
JRXPathExecuter
selectNodeList
in interface JRXPathExecuter
selectNodeList
in class JaxenXPathExecuter
contextNode
- the context node (a document can also be used)expression
- the XPath expressionJRException
- if the XPath evaluation failedpublic java.lang.Object selectObject(org.w3c.dom.Node contextNode, java.lang.String expression) throws JRException
JRXPathExecuter
java.lang.String
, java.lang.Number
or java.lang.Boolean
.selectObject
in interface JRXPathExecuter
selectObject
in class JaxenXPathExecuter
contextNode
- the context node (a document can also be used)expression
- the XPath expressionJRException
- if the XPath evaluation failedprotected boolean containsPrefixes(java.lang.String expression)
protected void addNamespaceContext(org.w3c.dom.Node contextNode, XPath xPath, java.lang.String expression) throws JRException
JRException
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com