Building XML with variables AS3
Honestly, I didn’t think this little test would work. But you can actually build out XML with variables. Here is a very simple example:
var tag:String = "tag";
var id:String = "Step";
var attribute:String = "id"
var xml:XML = <{tag} {attribute}={id}>Value In Tag<{tag}>
Seems obvious, but I still thought it was pretty cool. Also, there should be a “/” before that last “{tag}”, but WordPress wouldn’t render it right and I don’t know the trick to get it to show right.