Package org.apache.xml.security.utils
Class JDKXPathAPI
java.lang.Object
org.apache.xml.security.utils.JDKXPathAPI
- All Implemented Interfaces:
XPathAPI
An implementation for XPath evaluation that uses the JDK API.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear any context information from this objectboolean
Evaluate an XPath string and return true if the output is to be included or not.selectNodeList
(Node contextNode, Node xpathnode, String str, Node namespaceNode) Use an XPath string to select a nodelist.
-
Field Details
-
xpf
-
xpathStr
-
xpathExpression
-
-
Constructor Details
-
JDKXPathAPI
public JDKXPathAPI()
-
-
Method Details
-
selectNodeList
public NodeList selectNodeList(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException Use an XPath string to select a nodelist. XPath namespace prefixes are resolved from the namespaceNode.- Specified by:
selectNodeList
in interfaceXPathAPI
- Parameters:
contextNode
- The node to start searching from.xpathnode
-str
-namespaceNode
- The node from which prefixes in the XPath will be resolved to namespaces.- Returns:
- A NodeIterator, should never be null.
- Throws:
TransformerException
-
evaluate
public boolean evaluate(Node contextNode, Node xpathnode, String str, Node namespaceNode) throws TransformerException Evaluate an XPath string and return true if the output is to be included or not.- Specified by:
evaluate
in interfaceXPathAPI
- Parameters:
contextNode
- The node to start searching from.xpathnode
- The XPath nodestr
- The XPath expressionnamespaceNode
- The node from which prefixes in the XPath will be resolved to namespaces.- Throws:
TransformerException
-
clear
public void clear()Clear any context information from this object
-