What's the best way to dynamically load/bind XML data to Flesh/Flash UI 4.0 UI components?


I'm relatively new the world of Flex/Flash 4.0.
I'm trying to load/bind data into a Flex component.

I've got an advanced data grid embedded in a <mx:form>.
I've got some simple sample data in an external XML file.
The data (in an external file) looks like this:
<?xml version="1.0"?>
      <row> <user>John</user> <dataText>One Tweet Apple</dataText> </row>
      <row> <user>Fred</user> <dataText>Two Tweet Apple</dataText> </row>
      <row> <user>Ethel</user> <dataText>Three Tweet Apple</dataText> </row>
      <row> <user>Bob</user> <dataText>Four Tweet Apple</dataText> </row>
      <row> <user>Ringo</user> <dataText>Five Tweet Apple</dataText> </row>
      <row> <user>George</user> <dataText>Six Tweet Apple</dataText> </row>

I create my <mx:form> dynamically. So, I'd like to dynamically load in the xml data and bind it to the controls (grid and otherwise) in my form.

What's the best approach for this?

jxbmaSoftware ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
See this example where they show how to load a xml in advanceddatagrid.


when you say you mx:form dynamically you do it via actions script code?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jxbmaSoftware ConsultantAuthor Commented:
Yes. Based on user gesture, I create a component with an hGroup in a panel.
At that point, I determine what flavor of data the user wants and want to display
it within a grid on the newly created form.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Flex

From novice to tech pro — start learning today.