为什么我不能为数据字段绑定 xml 属性?(弹性 4)
<fx:Model id="sampleXML">
<contacts>
<contact firstName="Joe" lastName="Smith" emailAddress="joe@smith.com" />
<contact firstName="Sally" lastName="Lally" emailAddress="sally@lally.com" />
<contact firstName="Albert" lastName="Rigdon" emailAddress="albert@rigdon.com" />
</contacts>
</fx:Model>
<mx:DataGrid dataProvider="{sampleXML.contact}" id="dg">
<mx:columns>
<mx:DataGridColumn headerText="First Name" dataField="@firstName" />
<mx:DataGridColumn headerText="Last Name" dataField="@lastName" />
<mx:DataGridColumn headerText="Email Address" dataField="@emailAddress" />
</mx:columns>
</mx:DataGrid>