class Nokogiri::XML::Node
def search *paths
optional hash of namespaces may be appended.
Search this node for +paths+. +paths+ can be XPath or CSS, and an
##
def search *paths # TODO use paths, handler, ns, binds = extract_params(paths) ns = paths.last.is_a?(Hash) ? paths.pop : (document.root ? document.root.namespaces : {}) prefix = "#{implied_xpath_context}/" xpath(*(paths.map { |path| path = path.to_s path =~ /^(\.\/|\/)/ ? path : CSS.xpath_for( path, :prefix => prefix, :ns => ns ) }.flatten.uniq) + [ns]) end