Creating a new attribute in an XML node using E4X in AS3

TurboHz picture TurboHz · Mar 13, 2009 · Viewed 11.6k times · Source

Is there any way to do it?

Answer

TurboHz picture TurboHz · Mar 16, 2009

Thanks for answering.

I did found your explanations and link suggestions interesting and encouraging.

Anyway, I did not make myself clear with my question. What I did want to know was how to create any property, even without knowing it's name. I did read several docs and tutorials until I figured it out. Hope this can be of help.

var data:XML = <node/>;
var $my_attr:String = 'id';
data.@[$my_attr] = 'foo';