i have an XML like
var test:XML = new XML( <record id="5" name="AccountTransactions"
<field id="34" type="Nuber"/>
</record>);
i want to remove all the attributes other than id and type in all nodes of XML. by this code i am unable to do this. can you suggest better solution, other than loops.
var atts:XMLListCollection = new XMLListCollection(test.descendants().attributes().((localName() != "id") && (localName() != "type")));
atts.removeAll(); trace(test)
it still show all attributes :/