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; newXML.prependChild(coachXML); } trace("newXML:" + newXML);
Leave a Reply