# File lib/scrubyt/utils/xpathutils.rb, line 122
    def self.find_nearest_node_with_attribute(node, attribute)
      @node = nil
      return node if node.is_a? Hpricot::Elem and node[attribute]
      first_child_node_with_attribute(node, attribute)
      first_parent_node_with_attribute(node, attribute) if !@node
      @node
    end