From: "lrlebron@..." Date: 2008-07-02T03:07:09+09:00 Subject: Using hpricot to get tables I am working with the following script to parse a page require 'hpricot' require 'open-uri' strLink ="http://www.sportsline.com/mlb/gamecenter/boxscore/ MLB_20080331_ARI@CIN" strPath ="div[@class=SLTables1]/div" @doc = Hpricot(open(strLink)) @doc.search(strPath) do |div| puts div.inner_html # puts div.css_path # puts div.xpath # puts puts end This prints 4 tables to the screen blah, blah, blah
blah, blah, blah
blah, blah, blah
blah, blah, blah
I would like to access each table individually. How can I do that? Thanks, Luis