public class XPathAPI extends Object
XPathAPI class provides the convenience function for XPath API
that is a subset of Xalan XPathAPI but uses JAXP internally.| Modifier and Type | Method and Description |
|---|---|
static NodeList |
selectNodeList(Node doc,
String str)
Use an XPath string to select a nodelist.
|
static NodeList |
selectNodeList(Node doc,
String str,
NamespaceContext nsctx)
Use an XPath string to select a nodelist
Namespace prefix is resolved using the the specified context.
|
static NodeList |
selectNodeList(Node doc,
String str,
Node nsNode)
Use an XPath string to select a nodelist using a node namespace.
|
static Node |
selectSingleNode(Node doc,
String str)
Use an XPath string to select a single node.
|
static Node |
selectSingleNode(Node doc,
String str,
NamespaceContext nsctx)
Use an XPath string to select a single node using a passed in namespace context.
|
static Node |
selectSingleNode(Node doc,
String str,
Node nsNode)
Use an XPath string to select a single node using a provided element namespace.
|
public static Node selectSingleNode(Node doc, String str) throws XPathException
doc - The node to start searching from with the embedded context.str - XPath string.XPathExceptionpublic static Node selectSingleNode(Node doc, String str, Node nsNode) throws XPathException
doc - The node to start searching from.str - XPath string.nsNode - Node where namespace prefix in XPath is resolved from.XPathExceptionpublic static Node selectSingleNode(Node doc, String str, NamespaceContext nsctx) throws XPathException
doc - The node to start searching from.str - XPath string.nsctx - Namespace where the prefix in XPath is resolved from.XPathExceptionpublic static NodeList selectNodeList(Node doc, String str) throws XPathException
doc - The node to start searching from.str - XPath string.XPathExceptionpublic static NodeList selectNodeList(Node doc, String str, Node nsNode) throws XPathException
doc - The node to start searching from.str - XPath string.nsNode - Node where namespace prefix in XPath is resolved from.XPathExceptionpublic static NodeList selectNodeList(Node doc, String str, NamespaceContext nsctx) throws XPathException
doc - The node to start searching from.str - XPath string.nsctx - Namespace where the prefix in XPath is resolved from.XPathExceptionCopyright © 2010–2023 Open Identity Platform Community. All rights reserved.