Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8013191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:34:12+00:00 2026-06-04T19:34:12+00:00

My Flex app runs a service to a php page that pulls data from

  • 0

My Flex app runs a service to a php page that pulls data from my database, then structures the result in an XML format. I created a new XMLList called testList outside of any functions, then when the results come back (they first come to flex as a single string holding all of the XML code) I have the following code to turn it into XML and then append to my testList:

var s:String = event.result as String;
var xml:XML = new XML(s);
testList = xml.user;

The data is used in one function, then it’s also passed to a component of mine, where I try to display the XMLList in a List (with testList as dataProvider) and I get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@68ffa01 to mx.collections.IList.

I have a feeling it’s probably a noob error, but any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:34:14+00:00Added an answer on June 4, 2026 at 7:34 pm

    E4X expressions return lists of matching XML. xml.user gives you an XMLList of all user elements. You can use XMLListCollection, which implements IList, to wrap the result so you can use it as a dataprovider.

    var xml:XML = new XML(event.result as String);
    var list:IList = new XMLListCollection(xml.user);
    

    The other option is to loop though the XMLList and add it to an array or whatever collection you need. If you know for sure that there is only one user, you can do this instead:

    var user:XML = xml.user[0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a flex app that takes data from a back end database then
I have a flex 4.5 php app that runs perfectly on localhost. When I
I have a flex app that is hosted on my server. It runs off
I'm trying to integrate a Flex app with Google Checkout and code that runs
We have a Flex app that is currently loading an XML file that contains
I have a Flex application that builds and runs from Eclipse without any problems.
I have a Flex-app.xml. The actual manifest in the apk file seems to be
I'm using Flash Builder 3 to edit my Flex app, but I noticed that
We have that Flex app talking to the server. We need some kind of
Making an Flex App. Just wondering if anyone has created something that fits automatically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.