Just incase anyone is interested in my solution you can use this code.

public function CreateXML():String
   {
    var xml:XML = new XML("<Rows></Rows>");

    //loop through each row in the table
    for each(var row:Object in dg.dataProvider)
    {
     var rowXML:XML = new XML("<Row></Row>");
     var dataXML:XMLList = new XMLList();

     //for each column place the data in respective xml tags
     for each(var col:DataGridColumn in dg.columns)
     {
      var name:String = col.dataField;
      dataXML += <{name}> {(row[name] != null) ? row[name] : ""}
</{name}>;
     }
     rowXML.appendChild(dataXML);
     xml.appendChild(rowXML);
    }
    return xml.toXMLString();
   }







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to