Need only the tags which are at the first level

require ‘rubygems’
require ‘hpricot’

elements = Hpricot("

...stuff I don't want...
------------rows i want ------------end of rows i want
Field 0
Field 1 Field 2
Field 3 Field 4, Field 5

from this above code, in second table, i need only the first level of

values and i dont need the second level tags which says "Field 1 Field 2" , i mean the output should be "Field 0 Field 3 Field 4" . i tried but i got all values



Following_siblings method…

Srikanth J. wrote:


Following_siblings method…

thanks for your reply

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs