• flickr
  • linkedin
  • twitter
  • rss
DataGrid data to XML AS3

DataGrid data to XML AS3

Probably not the prettiest method to do this, but it’ll do for just before I go home. This is to change datagrid objects back into XML – this is only for my case and needs custom coding, but the method is there!

var newXML:XML = new XML(<coaches></coaches>);

for (var i:int = 0; i < dataGrid.length; i++) 
var dataGridObject:Object = dataGrid.getItemAt(i);
var coachXML:XML = new XML(<coach></coach>);
coachXML.name = dataGridObject.name;
trace("newXML:" + newXML);
Tech Reference: ,

Larry's a 30-something chap interested in travel, being a dork and changing the world via less boring training.

Leave a reply