Use Nokogiri::XML::Node#attribute_nodes which returns an ordered list of attribute nodes.
Use Nokogiri::XML::Node#attribute_nodes which returns an ordered list of attribute nodes.

postmodern/nokogiri-diff