xml = %{ }require 'rexml/document'doc = REXML::Document.new xmlp REXML::XPath.match(doc, '//[@color="green"]')[1]