I need to add an attribute to all nodes in an XML dynamically.My xml is as follows:
<root>
<item>
<item>Americas</item>
<item>Canada</item>
<item>Ottawa</item>
<item>Category 1</item>
<item>Product 01</item>
<item>4171.132339235787</item>
<item>4181.132339235787</item>
</item>
</root>
For which I need to add an attribute named "name" to each node in above XML as:
<root>
<item name="">
<item name="Americas"/>
<item name="Canada"/>
<item name="Ottawa"/>
<item name="Category 1"/>
<item name="Product 01"/>
<item name="4171.132339235787"/>
<item name="4181.132339235787"/>
</item>
</root>
How can this be achieved in Flex XML?