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
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
elems = doc.search("//a") elems.each do |elem| p elem.get_attribute("href") end