module Nokogiri::XML::Searchable

def xpath_impl(node, path, handler, ns, binds)

def xpath_impl(node, path, handler, ns, binds)
  ctx = XPathContext.new(node)
  ctx.register_namespaces(ns)
  path = path.gsub(/xmlns:/, " :") unless Nokogiri.uses_libxml?
  binds.each do |key, value|
    ctx.register_variable key.to_s, value
  end if binds
  ctx.evaluate(path, handler)
end