var tempXMl:XML = <object point="55" date="2010-4-6"/>; tempXMl.@abc = 456; trace(tempXMl.toXMLString());
输出
<object point="55" date="2010-4-6" abc="456"/>
动态
var temp:XMLNodeType var tempXMl:XML = <object point="55" date="2010-4-6"/>; var tempStr:String = "sdsdsd"; tempXMl.@[tempStr] = "sdsdksklfjgdlkfgdf" trace(tempXMl.toXMLString());
输出
<object point="55" date="2010-4-6" sdsdsd="sdsdksklfjgdlkfgdf"/>