How Does Flex read XML files.

Source: Internet
Author: User
How to Use flex to read XML files.

XML file: <? XML version = "1.0 ″ ?>
< Books >
< Item >
< Title > The complete guide to flex 2 and event 3.0 </ Title >
</ Item >
< Item >
< Title > Programming flex 2 (programming) </ Title >
</ Item >
< Item >
< Title > Adobe Flex 2: training from the source </ Title >
</ Item >
</ Books >

mxml file: XML version = "1.0" encoding = "UTF-8" ?>
mx: application xmlns: MX = "http://www.adobe.com/2006/mxml" layout =" absolute "
initialize =" myservice. send () ">
>

Import MX. collections. arraycollection;
Import MX. RPC. events. resultevent;

[Bindable]
Private var mydata: arraycollection;

Private function resulthandler (Event: resultevent): void {
Mydata = event. Result. Books. item;

}

]>
</MX: script>

<MX: httpserviceID= "Myservice"
URL= "Books. xml"
Result= "Resulthandler (event)"/>

<Mx: Text ID= "Something"Text= "{Mydata. getitemat (0). Title}"/>

</MX: Application>

From: http://www.cnblogs.com/xxcainiao/archive/2008/05/15/1198533.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.