Parse xml through "hpricot"

Hi All,

The follwoing is my xml
<soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>
soap:Body




.
.
.
.
.

.
.


</soap:Body>
</soap:Envelope>
by the following code i could reach up to parent node by using hpricot.
Now i need “Id” attribute value of all 's for each parent.
Can any one help me.

require ‘rubygems’
require ‘hpricot’
doch = Hpricot(resp_data.receive_string)
doch.search(“parent”).each do |parent|
puts parent.attributes[‘name’]
puts (parent/“refinement”)
end

Thanx
Chinna.