package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var example:XML = <example />; var id:int = 10; // Create a string to incorporate the value of id in the node name example[ "user" + id ] = ""; trace( example ); } } }