내가 내가 ID 이외의 모든 속성을 제거하고 XML의 모든 노드를 입력 할XML의 모든 하위 항목에서 특정 속성을 삭제하는 방법은 무엇입니까?
var test:XML = new XML(<record id="5" name="AccountTransactions"
<field id="34" type="Nuber"/>
</record>);
같은 XML이있다. 이 코드에 의해 나는 이것을 할 수 없다. 루프가 아닌 더 나은 솔루션을 제안 할 수 있습니까?
var atts:XMLListCollection = new XMLListCollection(test.descendants().attributes().((localName() != "id") && (localName() != "type")));
atts.removeAll(); trace(test)
는 여전히 모든 속성을 보여줍니다/
은 유, 감사 – Triode