Selects the first Xml Node that matches the XPath expression
.NET
Selects the first XmlNode
that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager
.
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
http://msdn.microsoft.com/en-us/library/h0hw012b(v=vs.110).aspx
Java
public abstract java.lang.Object selectSingleNode(java.lang.Object context)
throws JDOMException
Evaluates the wrapped XPath expression and returns the first entry in the list of selected nodes (or atomics). Parameters: context - the node to use as context for evaluating the XPath expression. Returns: the first selected item, which may be of types: Element, Attribute, Text, CDATA, Comment, ProcessingInstruction, Boolean, Double, String, or null if no item was selected. Throws: JDOMException - if the evaluation of the XPath expression on the specified context failed.
http://www.jdom.org/docs/apidocs.1.1/org/jdom/xpath/XPath.html#selectSingleNode(java.lang.Object)