Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
Wrap text
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
Pasted February 28, 2008 4:56AM EDT
by brough
Channel #rubyonrails on irc.freenode.com
Embed
paste again
Ads from Ruby Row