views:

19

answers:

1

I have an XML that looks like this:

<data>
  <image src="http://www.someweb.com/something.png"/&gt;
</data>

What is the correct way to use hpricot to extact just 'http://www.someweb.com/something.png'? The closest I can get is this...

>>(doc/"image").first
=> {emptyelem <image src="http://www.someweb.com/something.png"&gt;}

I've read the hpricot README on github and googled, but haven't found anything yet. Thanks in advance for any answers!

A: 
(doc/'data image').first.attributes['src']
vise