title: traversing ruby map issues
body: <p>I'm pulling the following XML from mediawiki API </p>
  
  <pre><code> &lt;?xml version="1.0"?&gt;
   &lt;api&gt;
        &lt;query&gt;
              &lt;pages&gt;
                   &lt;page pageid="309311" ns="0" title="Chenonetta     jubata"&gt;
                   &lt;images&gt;
                       &lt;im ns="6" title="File:Australian Wood Duck.jpg" /&gt;
                       &lt;im ns="6" title="File:Australian Wood Duck Female.JPG" /&gt;
                       &lt;im ns="6" title="File:Australian Wood Duck Male.JPG" /&gt;  
                       ...
                   &lt;/images&gt;
                   &lt;/page&gt;
              &lt;/pages&gt;
       &lt;/query&gt;
    &lt;/api&gt;
  </code></pre>
  
  <p>and reading it into a Ruby map using xmlSimple. The data which I'm really trying to get is the image names from the images section but when I attempt to go past the query level with</p>
  
  <pre><code>     x=  result['query']['pages']
       puts x  
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>   in `[]': can't convert String into Integer (TypeError)
  </code></pre>
  
  <p>what am I doing wrong? </p>
  
  <p>Thanks, 
  m</p>