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