Mega Code Archive
Categories
/
Ruby
/
XML
Find the color attributes of all small fish
xml = %{
} require 'rexml/document' doc = REXML::Document.new xml p REXML::XPath.match(doc, '//fish[@size="small"]/@color')