關於 XML(一)使用 Flash 載入 XML 資料

var verLoader:URLLoader = new URLLoader(new URLRequest("version.xml"));
verLoader.addEventListener(Event.COMPLETE,OnComplete);
function OnComplete()
{
	var verXML:XML = new XML(verLoader.data);
	trace(verXML);
}

var articleXML:XML = new XML(articleLoader.data);
var i:Number=0;

while(articleXML.article[i])
{
	articles[i]=new Object();
	articles[i].aid=articleXML.article[i].aid;
	articles[i].photo=articleXML.article[i].photo;
	articles[i].title=articleXML.article[i].title;
	articles[i].description=articleXML.article[i].description;
	i++;
}