【发布时间】:2010-02-13 08:10:28
【问题描述】:
我有可以加载到我的 flex 应用程序中的 xml 数据;但是,我需要按节点对其进行排序。
我正在尝试创建一个组合框或列表框,它可以显示位置列表,按字母顺序或它们所在的类别对它们进行排序...
我不知道如何格式化 xml 或如何编码 flash 文件以按位置名称按字母顺序排序,然后按一个按钮,按名称按字母顺序按类别第 1 和第 2 排序。
我应该像这样格式化 xml:
<POIs>
<location>
<name>Barbaras Bagels</name>
<additional nodes inbetween here>
<category>Restaurants</category>
</location>
<location>
<name>Bobs Powerwashing</name>
<addition nodes inbetween here>
<category>Services</category>
</location>
</POIs>
或者我应该像这样格式化它:
<POIs>
<Restaurants>
<location>
<name>Barbaras Bagels</name>
<additional nodes inbetween here>
</location>
</Restaurants>
<Services>
<location>
<name>Bobs Powerwashing</name>
<addition nodes inbetween here>
</location>
</Services>
</POIs>
上面的例子每个类别只有一个名字,但我相信你能理解
【问题讨论】:
标签: xml actionscript-3 sorting combobox listbox