Need only the tags which are at the first level


#1

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

#2

guhit…


#3

using/…

Following_siblings method…


#4

Srikanth J. wrote:

using/…

Following_siblings method…

thanks for your reply