title: Creating an XML string in Flex (AS3) by using DOM functions
body: <p>I want to create an XML string in Flex 3 in a similar way to you might approach it in Java. I only want a small piece of XML in the format</p>
  
  <pre><code>&lt;slide thumb="http://www.thumbs.com/thumb.jpg" type="static" blah="bleh" /&gt;
  </code></pre>
  
  <p>The only type of code I can find for doing this seems ridiculous....</p>
  
  <pre><code>private function createXML(): void
  {
  var xm:XML = &lt;Relyon&gt;&lt;/Relyon&gt;;
  var nodeName:String = “EMPLOYEENAME”;
  var nodeValue:String = “KUMAR”;
  var xmlList:XMLList = XMLList(”&lt;”+nodeName+”&gt;”+nodeValue+”&lt;/”+nodeName+”&gt;”);
  xm.appendChild(xmlList);
  Alert.show(xm);
  }
  </code></pre>
  
  <p>I would like to do something like...</p>
  
  <pre><code>var x:XMLNode = new XMLNode("slide");
  x.setAttribute("thumb", thumbURL);
  x.setAttribute("type", "static");
  </code></pre>
  
  <p>This is surely possible?</p>