From: Maui Guide Date: 2009-04-17T18:47:34+09:00 Subject: Array of Hashes (created by xmlsimple) I'm relatively new and this had me thoroughly confused today. require 'xmlsimple' myxml = "\r\n\"\"" xmltags = XmlSimple.xml_in(myxml) href_tag = xmltags['href'] #<-- this works fine img_tag = xmltags['img'] #<-- this works fine img_src = xmltags['img']['src'] #<-- this doesn't work irb(main):221:0> p img_tag [{"src"=>"http://www.mysite.com/images/picture.jpg", "border"=>"0", "height"=>"480", "alt"=>"", "width"=>"640"}] I can loop through all the hashes in the array (via img_tag.each do |t|) But isn't there a way to access the img src attribute directly? Thanks! -- Posted via http://www.ruby-forum.com/.