var test:XML = new XML(<record id="5" name="AccountTransactions"
<field id="34" type="Nuber"/>
</record>);
我想刪除所有比其他的id屬性和輸入XML的所有節點的XML。通過這段代碼,我無法做到這一點。除了循環之外,你能否提出更好的解決方案?
var atts:XMLListCollection = new XMLListCollection(test.descendants().attributes().((localName() != "id") && (localName() != "type")));
atts.removeAll(); trace(test)
它仍然顯示所有屬性:/
u能烏拉圭回合後確切的XML結構的感謝 – Triode 2012-02-27 07:09:50