class Nokogiri::XML::Node

def at path, ns = document.root ? document.root.namespaces : {}

Returns nil if nothing is found, otherwise a Node.

Search for the first occurrence of +path+.
##
def at path, ns = document.root ? document.root.namespaces : {}
  search(path, ns).first
end