From: "عمر ملقب بالثانی" Date: 2008-07-12T23:58:57+09:00 Subject: Re: Hpricot question Rainer wrote: > What I need [...] is a method that > tells me the first HTML tag of a fragment, whatever it is. You may want to use Element#name: $ irb -r hpricot >> d = Hpricot('
first div

a paragraph

a span
') => # "first div" {elem

"a paragraph" {elem "a span" }} }> >> d.search('*').first.name => "div" Regards, Ömer [yet another Ruby beginner]. -- Posted via http://www.ruby-forum.com/.