xml = %{ }require 'rexml/document'doc = REXML::Document.new xmlp REXML::XPath.first(doc, "count(//fish[@size='large'][1]//*fish)")