伙计们,的Flex-的ActionScript: - XML解析
我有以下在ActionScript xml
。
var xml:XML = <Top>
<Component>
<type>Button</type>
<id></id>
<width>50</width>
<height>20</height>
<x>0</x>
<y>0</y>
</Component>
<Component>
<type>Label</type>
<id></id>
<width>30</width>
<height>10</height>
<x>0</x>
<y>0</y>
</Component>
</Top>;
现在,我想读/解析该XML字符串,然后生成根据其各自的特性Flex控件(即按钮,标签)。
如何做到这一点?
谢谢。
灿我们在一些arraycollection/dictionary中以名称 - 值对的形式进行存储?我无法做到这一点...... –
啊,它很好地转换xml。然后你有o.Top.Component.getItemAt(index)将是一个对象(这是一个名称 - 值对基本上) –
你是天才的人! Flex-guru :) ..你的soln工作顺利。从我+1和接受这个答案。再次感谢 :) –