title: as3 create xml basic question
body: <p>While I'm having no problems parsing incoming XML, I can't seem to construct valid outgoing xml. This is my code:</p>
  
  <pre><code>   myXML =
     &lt;INFO&gt;
     &lt;imgname&gt;testimage.jpg&lt;/imgname&gt;
     &lt;totalCols&gt;{totalCols}&lt;/totalCols&gt;
     &lt;/INFO&gt;;
  </code></pre>
  
  <p>//The XML up to this point traces the desired output, it's when I try to append with the for loop that problems arise:</p>
  
  <pre><code>for (var i:Number = 0; i&lt;totalCols; i++)
     {
      var tags:XML = 
      &lt;tags&gt;
      &lt;tagx&gt; {tagDisplay[i].x} &lt;/tagx&gt;
      &lt;tagy&gt; {tagDisplay[i].y} &lt;/tagy&gt;
      &lt;tagtext&gt; {tagDisplay[i].tagTxt.text} &lt;/tagtext&gt;
      &lt;/tags&gt;;
  
      myXML.appendChild(tags);
     }
  </code></pre>
  
  <p>The desired output I want is:</p>
  
  <pre><code>    &lt;INFO&gt;
      &lt;imgname&gt;testimage.jpg&lt;/imgname&gt;
      &lt;totalCols&gt;7&lt;/totalCols&gt;
  //for loop kicks in here:
      &lt;tags&gt;
      &lt;tagx&gt;100&lt;/tagx&gt;
      &lt;tagy&gt;100&lt;/tagy&gt;
      &lt;tagtext&gt;tag1&lt;/tagtext&gt;
      &lt;/tags&gt;
      &lt;tags&gt;
      &lt;tagx&gt;120&lt;/tagx&gt;
      &lt;tagy&gt;120&lt;/tagy&gt;
      &lt;tagtext&gt;tag2&lt;/tagtext&gt;
      &lt;/tags&gt;
  ...etc for the total number in the for loop.
      &lt;/INFO&gt;
  </code></pre>
  
  <p>Really simple I know, but my code just doesn't seem to work with the for loop included! Any advice much appreciated.</p>