Hi.

I've got a file that contains a table that looks like this:

<table>
  <tr><td>column title a</td><td>column title b</td></tr>
  <tr><td>row 1 a</td><td>row 1 b</td></tr>
  <tr><td>row 2 a</td><td>row 2 b</td></tr>
  <tr><td>row 3 a</td><td>row 3 b</td></tr>
  <tr><td>row 4 a</td><td>row 4 b</td></tr>
</table>

I need to read the rows starting with the second table row, which
excludes the title of the column.  Then I need to read each column's
value.

How can I loop through each row to get each value that I need?

To read a row of values I used
(doc/"/html/body/table/tbody/tr[2]/td[1]").inner_html >> row 1 a
(doc/"/html/body/table/tbody/tr[2]/td[2]").inner_html >> row 1 b


I tried variations of each loops that would increment the table row, but
I don't have the syntax correct for it to work.

Any ideas?

THANKS!
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to