Vivek Netha wrote:

> x = Array.new
> x << doc.search("//li[@class='g w0']/h3/a")
> 
> the XPath checker in firefox shows that I have the right path. but the 
> command doesn't work in irb. how do i drill down to specific elements so 
> that i can extract the title text and url? and wats wrong with my 
> xpath??

Don't use Hpricot - its XPath support only covers a very few predicate and path 
types. Use libxml-ruby, if you can install it, or REXML, if you don't mind the 
slow speed (the RE stands for Regular Expressions!), or nokogiri, which I don't 
know how to recommend yet, but I will soon.

BTW Google for my street-name and XPath for all kinds of fun in Ruby with them.

-- 
   Phlip