Class JavaXmlXPathQueryExecutor
java.lang.Object
eu.europa.esig.dss.xml.utils.xpath.AbstractXPathQueryExecutor
eu.europa.esig.dss.xml.utils.xpath.JavaXmlXPathQueryExecutor
- All Implemented Interfaces:
XPathQueryExecutor, XPathStringExecutor
public class JavaXmlXPathQueryExecutor
extends AbstractXPathQueryExecutor
implements XPathStringExecutor
Executes XPath expression query based on the
javax.xml.xpath.XPathExpression class.-
Field Summary
Fields inherited from class AbstractXPathQueryExecutor
namespaceContextModifier and TypeFieldDescriptionprotected NamespaceContextMapMap containing the defined namespaces -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected XPathExpressioncreateXPathExpression(String xpathString) This method creates a new instance of XPathExpression with the given xpath querygetNodeList(Node xmlNode, eu.europa.esig.dss.xml.common.xpath.XPathQuery xPathQuery) Returns the NodeList corresponding to the XPath query.getNodeList(Node xmlNode, String xPathString) Returns the NodeList corresponding to the XPath query.Methods inherited from class AbstractXPathQueryExecutor
setNamespaceContextModifier and TypeMethodDescriptionvoidsetNamespaceContext(NamespaceContextMap namespaceContext) Sets the namespace context map containing a declaration of namespaces defined within the used XPath expressionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface XPathStringExecutor
setNamespaceContextModifier and TypeMethodDescriptionvoidsetNamespaceContext(NamespaceContextMap namespaceContext) Sets the namespace context map containing a declaration of namespaces defined within the used XPath expressions
-
Constructor Details
-
JavaXmlXPathQueryExecutor
public JavaXmlXPathQueryExecutor()Default constructor
-
-
Method Details
-
getNodeList
public NodeList getNodeList(Node xmlNode, eu.europa.esig.dss.xml.common.xpath.XPathQuery xPathQuery) Description copied from interface:XPathQueryExecutorReturns the NodeList corresponding to the XPath query.- Specified by:
getNodeListin interfaceXPathQueryExecutor- Parameters:
xmlNode- The node where the search should be performed.xPathQuery-XPathQuery- Returns:
- the NodeList corresponding to the XPath query
-
getNodeList
Returns the NodeList corresponding to the XPath query.- Specified by:
getNodeListin interfaceXPathStringExecutor- Parameters:
xmlNode- The node where the search should be performed.xPathString-StringXPath query string- Returns:
- the NodeList corresponding to the XPath query
-
createXPathExpression
This method creates a new instance of XPathExpression with the given xpath query- Parameters:
xpathString-Stringrepresenting the XPath expression to be executed- Returns:
- an instance of
XPathExpressionfor the given xpathString
-