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</UserNa me>
<Password>helloworld</Pass word>
</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?
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</UserNa
<Password>helloworld</Pass
</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?
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
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
I think Adobe itself is the best source to start with (http://livedocs.adobe.com/flex/3/html/help.html):
http://livedocs.adobe.com/flex/3/html/13_Working_with_XML_01.html
http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_8.html
also
http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/
Another good source for Flex examples is http://blog.flexexamples.com. In your specific case http://blog.flexexamples.com/category/xml/
http://livedocs.adobe.com/flex/3/html/13_Working_with_XML_01.html
http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_8.html
also
http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/
Another good source for Flex examples is http://blog.flexexamples.com. In your specific case http://blog.flexexamples.com/category/xml/
ASKER
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!
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> 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
The link (http://livedocs.adobe.com/flex/3/html/13_Working_with_XML_01.html) I provided does
ASKER
I cut and paste the code in and adapted to suit my needs - worked perfectly.
Good to hear that it worked... Thanks for accepting :)
ASKER
vindys80:
In case you're interested ;-)
https://www.experts-exchange.com/questions/25093214/Using-XML-in-a-datagrid.html
In case you're interested ;-)
https://www.experts-exchange.com/questions/25093214/Using-XML-in-a-datagrid.html
ASKER