R
Robert Klemme
require 'mechanize'
mech = WWW::Mechanize.new
mech.get 'http://www.shoe-g.com/index.rdf'
doc = Nokogiri(mech.page.body)
titles = (doc / 'title').map(&:text)
Here's a similar solution using REXML:
require 'open-uri'
require 'rexml/document'
body = open('http://www.shoe-g.com/index.rdf').read
doc = REXML:ocument.new body
titles = doc.elements.to_enumeach, '//title').map(&:text)
Five lines as well...
Cheers
robert