DuPreez 1 Posted October 7, 2011 Report Share Posted October 7, 2011 I want to convert an XMLList into an Array (not an ArrayCollection). I do understand that an ArrayCollection is actually only a wrapper around an Array & at the heart of an ArrayCollection is in fact an Array. At this stage I can convert the XMLList into an ArrayCollection like so: testInfo = event.result.node; // testInfo is an XMLList myData = new ArrayCollection(mx.utils.ArrayUtil.toArray(testInfo.LoadType)); // myData is an ArrayCollection. Testing (component implementation), the only way I’ve been able to access the content (stripped of start & end XML tags) is like so: In a combobox: <mx:ComboBox dataProvider="{myData.getItemAt(0)}" /> or in a List: <mx:List dataProvider="{testInfo}" labelField="LoadType"/> If I use <mx:ComboBox dataProvider="{myData}"/> without the getItemAt(0)-part, the start & end XML tags are still included. Why??? The reason I want an Array is to ultimately use it in a PieSeries to bind to perWedgeExplodeRadius. I'm using Flex 4 with FlashBuilder IDE. Thanks. Quote Link to post Share on other sites
Larry 428 Posted October 11, 2011 Report Share Posted October 11, 2011 Would this solution work for you? http://stackoverflow.com/questions/583473/how-can-i-convert-a-simple-xmllist-to-an-array-of-strings-without-a-loop Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.