For example
i want to change
<item id="1"/>
to
<item code="1"/>
thanks.
For example
i want to change
<item id="1"/>
to
<item code="1"/>
thanks.
You can use setName to change the attribute name:
Here for example change all your id
attributes with code
:
var xmlTest:XML=<r><item id="1"/></r>;
for each (var node:XML in xmlTest.item.descendants("@id"))
node.setName("code");
trace(xmlTest);