xml中数据绑定到某控件

把xml中的数据绑定到某控件上,要先定义一个变量,把数据取出来放到这个变量中在把这个变量绑定到控件上

例如:

 

[Bindable]    private var cursel:String;

protected function noticeService_resultHandler(event:ResultEvent):void    {     var xml:XML =event.result as XML

   cursel =xml.cursel;

}

    

<s:HTTPService id="delNoticeService"         url="../../oa/InfoManage/AfficheDel.do"         result="delNoticeService_resultHandler(event)"         fault="delNoticeService_faultHandler(event)"         method="GET"         resultFormat="e4x">    <s:request xmlns="">    <cursel>{noticeText.text}</cursel>

 </s:request>

 

 <s:TextInput id="noticeText" text="{cursel}" visible="false"/>

 
   

你可能感兴趣的:(xml)