标签:
var type:Array = ["type0", "type1", "type2"]; var property:Array = [["20","0","1.jpg"], ["60","0","2.jpg"], ["120","0","3.jpg"]];
var data:XML = new XML("<data type=‘any‘></data>"); for (var i:int = 0; i < property.length; i++) { var node:XML = new XML(); node = <item type={type[i]}> <property x={property[i][0]} y={property[i][1]}></property> <path url={property[i][2]}></path> </item>; data = data.appendChild(node) } trace(data);
[ActionScript 3.0] AS3.0 生成xml方法之一
标签:
原文地址:http://www.cnblogs.com/frost-yen/p/5622889.html