How to read table's cell in ruby?

Hello,

Can anyone tell me how to read cells of a table on a webpage?
plz tell me methods.

Thanks in Advance
Deepak

Deepak Kumar Shivhare wrote:

Can anyone tell me how to read cells of a table on a webpage?
plz tell me methods.

Take a look at Hpricot: http://code.whytheluckystiff.net/hpricot/

Deepak Kumar Shivhare wrote:

Hello,

Can anyone tell me how to read cells of a table on a webpage?
plz tell me methods.

Check out scRUBYt!:

http://scrubyt.org

Quick example:

Input

1 2
3 4 5

6
7
8

9 10
11
=================================================================

scRUBYt program to extract all the cells:

=================================================================
table_data = Scrubyt::Extractor.define do

 fetch "input.html"

 cell '1'

end

output:

=================================================================

1
2
3
4
5
6
7
8
9
10
11

Cheers,
Peter
__
http://www.rubyrailways.com :: Ruby and Web2.0 blog
http://scrubyt.org :: Ruby web scraping framework
http://rubykitchensink.ca/ :: The indexed archive of all things Ruby