public class XalanNsAwareXPathExecuter extends XalanXPathExecuter
EXCEPTION_MESSAGE_KEY_XPATH_SELECTION_FAILURE
Constructor and Description |
---|
XalanNsAwareXPathExecuter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
containsPrefixes(String expression) |
protected void |
createNamespaceElement(Node contextNode,
String expression) |
Map<String,String> |
extractXmlNamespaces(Node contextNode) |
boolean |
getDetectXmlNamespaces() |
Map<String,String> |
getXmlNamespaceMap() |
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.
|
void |
setDetectXmlNamespaces(boolean detectXmlNamespaces) |
void |
setXmlNamespaceMap(Map<String,String> xmlNamespaceMap) |
public XalanNsAwareXPathExecuter()
public void setXmlNamespaceMap(Map<String,String> xmlNamespaceMap) throws JRException
JRException
public boolean getDetectXmlNamespaces()
public void setDetectXmlNamespaces(boolean detectXmlNamespaces)
protected void createNamespaceElement(Node contextNode, String expression) throws JRException
JRException
public NodeList selectNodeList(Node contextNode, String expression) throws JRException
JRXPathExecuter
selectNodeList
in interface JRXPathExecuter
selectNodeList
in class XalanXPathExecuter
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
selectObject
in class XalanXPathExecuter
contextNode
- the context node (a document can also be used)expression
- the XPath expressionJRException
- if the XPath evaluation failedprotected boolean containsPrefixes(String expression)
public Map<String,String> extractXmlNamespaces(Node contextNode) throws JRException
JRException
Copyright © 2017. All rights reserved.