This content has been marked as final. Show 4 replies
I believe you can do: lastResult..name to make an XMLList of the <name> nodes (note 2 dots).
But if your dataProvider is an XMLList of <heading> items, then your DataGridColumn dataField="name" should work since to retrieve the name value from any item is: item.name.
Ok that worked just like you said it would but would you mind explaining to me why it works? Im a little confused but that is easy to do. So when i tell it to retreive the result and its properly formed xml it just takes any repeating tab and builds them into an array of the same name automaticaly everytime?
I think you understand it pretty well. Just through the info on E4X and it will probably make a lot of sense to you now.
Just keep in mind you aren't getting an "Array" or "ArrayCollection" but an XMLList which acts like an array where you can get its length, address the items using the [ ] operator, etc.
When using an XMLList as a dataProvider, it would be better to convert it to an XMLListCollection so you can take advantage of data binding should you need to change the XML on the fly, such as editing nodes, adding nodes, or removing nodes. And you can use the Collection cursor views, filtering, and sorting.