Enterprise APP
XMLList(XML) to Array, 본문
import mx.utils.ObjectProxy;
public static function xmlListToObjectArray(xmlList:XMLList):Array
{
var arr:Array = new Array();
for each(var xml:XML in xmlList)
{
var childs:XMLList = xml.children();
var obj:Object = new Object();
for each(var child:XML in childs)
{
var nodeName:String = child.name().toString();
var nodeValue:String = child.text().toString();
obj[nodeName] = nodeValue;
}
arr.push(new ObjectProxy(obj));
}
return arr;
}
'Flex General > Tips' 카테고리의 다른 글
Flex4 배경 투명(background alpha) 설정하기 (0) | 2010.04.28 |
---|---|
Flash Bulider 4 Secrets (0) | 2010.04.09 |
Three ways to load image files in Flex (0) | 2010.03.27 |
Binding 에러 이슈 (0) | 2010.03.26 |
flex & 마우스 휠 처리 (0) | 2010.03.18 |
Comments