> But given the table structure noted above, will XPath actually work to
> take the variables that I need in each of the columns and insert those
> into database fields?  I need to locate 3 separate columns and grab each
> of those by row and insert those into a table.  So the html and the
> database table will end up looking the same.

If you need a row at a time, then you just shorten your XPath a bit:

  doc = XML::Parser.string(html).parse
  doc.find('/table/tr[position()>1]').each do |row|
    my_db_insert(row.find('td/text()').to_a)
  end

-- Mark.
--~--~---------~--~----~------------~-------~--~----~
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