我有一個非常簡單的場景,在那裏我有類似這樣如何通過ActionScript 3中的嵌套子元素值過濾xml節點?
<tours>
<tour>
<name>Italy 1</name>
<destinations>
<destination>Rome</destination>
<destination>Milan</destination>
<destinations>
</tour>
<tour>
<name>Italy 2</name>
<destinations>
<destination>Rome</destination>
<destination>Venice</destination>
<destinations>
</tour>
</tours>
現在我想查詢所有去米蘭的旅遊團的結構。
下面是我能想到的基於EX4風格
XmlData.tour.(destinations.destination.(name == "Milan"))
但是,當然,這不工作的邏輯格式。
在不使用任何額外邏輯的情況下拉動這些數據的正確方法是什麼?
有趣的是,它與E4X文檔中的應用程序的工作方式相比,看起來有點奇怪,它有點奇怪。對於OP:我發現http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=4這可能會給你提供有關在AS3中使用xml的相關詳細信息。 –
它工作得很好。感謝您的幫助,謝謝。 –