这个例子没有使用 XMLListCollection 而是使用了 ArrayCollection 作为数据格式 这里用到了 HTTPService 的 result 事件进行了数据绑定处理 <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="remoteData.send()"> <s:layout> <s:BasicLayout/> </s:layout> <fx:Script> <!--[CDATA[ import mx.collections.ArrayCollection; import mx.events.ListEvent; import mx.rpc.events.ResultEvent; import spark.events.IndexChangeEvent; [Bindable] private var m:ArrayCollection = new ArrayCollection(); protected function remoteData_resultHandler(event:ResultEvent):void { m = event.result.root.menuitem; } protected function dropdownlist1_changeHandler(event:IndexChangeEvent):void { var url:String = event.currentTarget.selectedItem.url; trace(url); if(url!=null&&url!="") { navigateToURL(new URLRequest(url),"_blank"); } } ]]--> </fx:Script> <fx:Declarations> <s:HTTPService id="remoteData" url="http://10.8.1.32/oasServices/test.xml" result="remoteData_resultHandler(event)" /> </fx:Declarations> <s:DropDownList dataProvider="{m}" labelField="name" change="dropdownlist1_changeHandler(event)"></s:DropDownList> </s:Application>