public function displayauthor (authors:XMLList):void {
for each (var author:XML in authors)
{
/ADD THIS, remove the Private one on top
var authorObj:Object = new Object();
authorObj.name = author.name;
authorObj.birthdate = author.birthdate;
collection.addItem( authorObj );
//trace("name: " + author.name + " -- birthdate: " +
author.birthdate);
}
collection.refresh();
}
----- Original Message ----
From: flexawesome <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, May 23, 2008 3:23:02 PM
Subject: [flexcoders] Very simple - Convert XML => ArrayCollection =>
DataProvider
I was trying to covert the XML file into ArracyCollection, but I had a
problem for binding with DataGrid. It was showing the same record in
twice on the DataGrid.
The sample file was simple
http://www.privatep aste.com/ 2c1WhD4jvj
Would you pls take a look?
Have a nice weekend