title: actionscript 2.0 read XML file
body: <p>I'm trying to read an XML file with actionscript 2.0</p>
  
  <p>The problem is I can only make my code to read a value of a tag by referencing their position.</p>
  
  <p>e.g.
  <code>var currentIcon = myXML.firstChild.firstChild.childNodes[0].firstChild;</code></p>
  
  <p>How do I retrieve a value from an XMl file by referencing their tag name?</p>
  
  <p>e.g.
  <code>var currentIcon = myXML.firstChild.firstChild.childNodes['icon'].firstChild;</code></p>
  
  <p>Here is my XML file...</p>
  
  <pre><code>&lt;weather&gt;
      &lt;current&gt;
          &lt;icon&gt;Partly cloudy&lt;/icon&gt;
          &lt;temphigh&gt;33&lt;/temphigh&gt;
          &lt;templow&gt;24&lt;/templow&gt;
          &lt;humhigh&gt;55&lt;/humhigh&gt;
          &lt;humlow&gt;95&lt;/humlow&gt;
      &lt;/current&gt;
      &lt;forecast1&gt;
          &lt;day&gt;Monday&lt;/day&gt;
          &lt;icon&gt;rss_ts2&lt;/icon&gt;
          &lt;temphigh&gt;33&lt;/temphigh&gt;
          &lt;templow&gt;24&lt;/templow&gt;
      &lt;/forecast1&gt;
      &lt;forecast2&gt;
          &lt;day&gt;Tuesday&lt;/day&gt;
          &lt;icon&gt;rss_ts2&lt;/icon&gt;
          &lt;temphigh&gt;32&lt;/temphigh&gt;
          &lt;templow&gt;23&lt;/templow&gt;
      &lt;/forecast2&gt;
      &lt;forecast3&gt;
          &lt;day&gt;Wednesday&lt;/day&gt;
          &lt;icon&gt;rss_ts2&lt;/icon&gt;
          &lt;temphigh&gt;32&lt;/temphigh&gt;
          &lt;templow&gt;23&lt;/templow&gt;
      &lt;/forecast3&gt;
  &lt;/weather&gt;
  </code></pre>