先上代码:
1 <fx:Model id="MyEmployee">
2 <roots> //必须定义这个根节点,名字可任意取
3 <root>
4 <name>
5 sdfsdf
6 </name>
7 <department>Accounting</department>
8 <email>wtuckerman@wilsoncompany.com</email>
9 </root>
10 <root>
11 <name>
12 sdfsdf
13 </name>
14 <department>Accounting</department>
15 <email>wtuckerman@wilsoncompany.com</email>
16 </root> //必须有超过一条记录,如这里的就有两个<root>节点
17 </roots>
18 </fx:Model>
19 <s:ArrayCollection id="emlarray" source="{MyEmployee.root}" /> //进行数据转换
然后就可以提供给一些容器测试:
<s:DataGrid includeIn="State1" x="378" y="443" dataProvider="{emlarray}" />