我試過很多不同的方式來訪問屬性的名稱,但只是無法讓它工作。AS3 XML,具有屬性的nodeName出現空白
當前功能:
protected function applyProperties(_axml:XML):void
{
var list:XMLList = _axml.properties;
var list2:XMLList = list.attributes();
for (var i = 0; i < list2.length(); i++) {
trace(list2[i].nodeName.toString());
}
}
它引用的XML:
<content type="media">
<target>warning.png</target>
<properties x="20" mouseEnabled="$false"></properties>
</content>
我都試過了名字,我試圖尋找它作爲一個對象,就找上計算器的解決方案..到目前爲止,沒有任何工作爲我工作。最初我有這樣的屬性節點: 擔心閃存解釋不正確。
編輯:這似乎是XML被interpretted而不是打印出來..