Ok, but that is "cheating".  I do it myself, but just so you know, looping
in XML usually means you gave up trying to figure out the right e4x
expression.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Jim
Sent: Friday, April 10, 2009 11:37 AM
To: [email protected]
Subject: [flexcoders] Re: Need help processing XML into Flex app

 






Tracy,
I got it! It turns out that Roles are returned as an array, since the
<Roles> node repeats. So this did it:

protected function displayRoles (item:Object, column:DataGridColumn):String 
{
roleList = "";
for (i = 0; i < item.Roles.length; i++) {
roleList = roleList + item.Roles[i].RoleName + "\n";
}
return roleList;
}

That gave me a variable "roleList" with each role and a newline like:

User
Portal User
Administrator

Thanks again for your help. 
Jim



Reply via email to