From: Peter Szinek Date: 2006-11-21T04:42:34+09:00 Subject: Re: Ruby screen scraping Chris Gallagher wrote: > Turns out I actually ended up abandonning HTree and the rest. I used > net/http in order to fetch the page and then took the table of the page > that I was interested in examining and converted that using rexml. I > have now been able to grab the values that I wanted using XPath :) If you are keen on XPaths, why not: table = XPath.first(doc, "//table[@class='index' && @width='100%']") then use 'table' instead of 'converted_data'... or even module_name = XPath.first(doc, "//table[@class='index' && @width='100%']//td[@class='data']/a/]") etc. (Untested since I don't have your doc, but it should +- work) Cheers, Peter __ http://www.rubyrailways.com