Report abuse


			
require 'rubygems'
require 'hpricot'

xml = ""

 doc = Hpricot.XML(xml)
 (doc/:item).each do |item|
   puts item.at(:title).attributes['foo']
 end

$ ruby hp.rb 
bar
hum
bug