public class JaxenNsAwareXPathExecuter extends JaxenXPathExecuter
JaxenXPathExecuter.NodeListWrapper
Constructor and Description |
---|
JaxenNsAwareXPathExecuter()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addNamespaceContext(Node contextNode,
org.jaxen.XPath xPath,
String expression) |
protected boolean |
containsPrefixes(String expression) |
boolean |
getDetectXmlNamespaces() |
Map<String,String> |
getXmlNamespaceMap() |
protected org.jaxen.XPath |
getXPath(Node contextNode,
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.
|
void |
setDetectXmlNamespaces(boolean detectXmlNamespaces) |
void |
setXmlNamespaceMap(Map<String,String> xmlNamespaceMap) |
getXPath
public JaxenNsAwareXPathExecuter()
public void setXmlNamespaceMap(Map<String,String> xmlNamespaceMap) throws JRException
JRException
public boolean getDetectXmlNamespaces()
public void setDetectXmlNamespaces(boolean detectXmlNamespaces)
protected org.jaxen.XPath getXPath(Node contextNode, String expression) throws JRException
JRException
public NodeList selectNodeList(Node contextNode, 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 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 JaxenXPathExecuter
contextNode
- the context node (a document can also be used)expression
- the XPath expressionJRException
- if the XPath evaluation failedprotected boolean containsPrefixes(String expression)
protected void addNamespaceContext(Node contextNode, org.jaxen.XPath xPath, String expression) throws JRException
JRException
Copyright © 2015. All rights reserved.