a fast, enjoyable html parser for ruby

Hpricot is a very flexible HTML parser, based on Tanaka Akira's HTree and John Resig's JQuery, but with the scanner recoded in C (using Ragel for scanning.) I've borrowed what I believe to be the best ideas from these wares to make Hpricot heaps of fun to use.

require 'hpricot'require 'open-uri'# load the RedHanded home pagedoc = Hpricot(open("http://redhanded.hobix.com/index.html"))# change the CSS class on links(doc/"span.entryPermalink").set("class", "newLinks")# remove the sidebar(doc/"#sidebar").remove# print the altered HTMLputs doc