Link to home
Start Free TrialLog in
Avatar of PMembrey
PMembrey

asked on

Simple Flex XML example

Hi,

I'm looking for a very simple XML example for use with Flex 3. Basically I have an xml file at http://localhost/data.xml that consists of:

<TestData>
<User>
<Name>Peter Membrey</Name>
<UserName>pmembrey</UserName>
<Password>helloworld</Password>
</User>
</TestData>

I would like to open this file and then be able to work with the content. So far whatever I've tried has failed and I'm not sure why. Ultimately I would like to have multiple users shown in a tree layout - but right now I can't even get to the data :-)

Any ideas?
Avatar of PMembrey
PMembrey

ASKER

As a side question, if anyone knows how to move this to the correct area - that would also be appreciated :-/
Hi,

You can use HttpService to load a file from server.

This link might be helpful for you.
http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/
http://www.adobe.com/devnet/flex/quickstart/httpservice/

Thanks,
Vindys
Hi guys,

I'm really looking for a code example that shows how I can load this data (either from a file or web service) and access the different parts...

Cheers!
ASKER CERTIFIED SOLUTION
Avatar of vindys80
vindys80
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> I'm really looking for a code example that shows how I can load this data (either from a file or web service) and access the different parts...
The link (http://livedocs.adobe.com/flex/3/html/13_Working_with_XML_01.html) I provided does
I cut and paste the code in and adapted to suit my needs - worked perfectly.
Good to hear that it worked... Thanks for accepting :)