Hpricot problem


#1

Hi,

I would like to know how to retrieve the value of an attribute.

For example (doc/".nom/a") will return an array of elements. I would
like to know the value of the href attribut of each element.

thanks for your help


#2

elems = doc.search("//a")
elems.each do |elem|
p elem.get_attribute(“href”)
end