我正在嘗試讀取下面的xml文件並獲取Flex/Actionscript中的名稱/值對。Flex/ActionScript - XML
sample.xml中
<ABC>
<XYZ> // First child
<id> </id>
<width> 10 </width>
<height> 10 </height>
<name> Person1 </name>
</XYZ>
<XYZ> // Second child
<id> </id>
<width> 20 </width>
<height> 20 </height>
<name> Person2 </name>
</XYZ>
</ABC>
我嘗試使用下面的所有變量名和值的詳細信息使用XML
的.name()
和.text()
功能既孩子的,但我沒有得到它。
我的問題是,
誰能告訴我如何解析這個XML獲得細節每個孩子的 單獨在一個對象,然後將該對象存儲在 陣列供以後使用?
在此先感謝
爲什麼不保持它在XML,並用它作爲源爲XMLListCollection? E4x語法與對象引用語法沒有多大區別。 –