Forum: Ruby on Rails Hpricot problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
jef (Guest)
on 2008-10-11 18:45
(Received via mailing list)

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
Andrew C. (Guest)
on 2008-10-12 07:19
elems ="//a")
elems.each do |elem|
  p elem.get_attribute("href")
This topic is locked and can not be replied to.