CopyCodeThe Code is as follows: <? XML version = "1.0" encoding = "UTF-8"?>
<Mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml"
Layout = "vertical"
Verticalalign = "Middle"
Backgroundcolor = "white"
Creationcomplete = "Init ();" viewsourceurl = "srcview/index.html">
<Mx: SCRIPT>
<! [CDATA [
Import MX. rpc. Events. faultevent;
Import MX. rpc. Events. resultevent;
Private function Init (): void {
Commentsxml. Send ();
}
Private function commentsxml_result (EVT: resultevent): void {
VaR resultxml: xml = EVT. currenttarget. lastresult;
List. dataprovider = resultxml. Channel. item;
}
Private function commentsxml_fault (EVT: faultevent): void {
MX. Controls. Alert. Show ("unable to load XML: N" + commentsxml. url, "error ");
}
]>
</MX: SCRIPT>
<Mx: httpservice id = "commentsxml"
Url = "http://blog.minidx.com/comments/feed"
Resultformat = "E4X"
Showbusycursor = "true"
Result = "commentsxml_result (event );"
Fault = "commentsxml_fault (event);"/>
<Mx: List id = "list"
Variablerowheight = "true"
Wordwrap = "true"
Labelfield = "title"
Width = "250"/>
</MX: Application>