code: public  Node selectSingleNode(
            Node contextNode, String str, Node namespaceNode)
              throws TransformerException
    {
  
      // Have the XObject return its result as a NodeSetDTM.
      NodeIterator nl = selectNodeIterator(contextNode, str, namespaceNode);
  
      // Return the first node, or null
      return nl.nextNode();
    }
docs: Use an XPath string to select a single node.
  XPath namespace prefixes are resolved from the namespaceNode.
  
  @param contextNode The node to start searching from.
  @param str A valid XPath string.
  @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
  @return The first node found that matches the XPath, or null.
  
  @throws TransformerException