Flex - How to change xml attribute name?
For example I want to change
&l开发者_Python百科t;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);
精彩评论