我想计算解析时间....
包 {
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.events.Event;
import flash.net.URLRequest;
public class Graph extends MovieClip
{
private var xmlFile:XML;
private var urlLoader:URLLoader = new URLLoader ;
public function Graph()
{
loadXML();
// constructor code
}
private function loadXML(file:String="xml/Employee.xml"):void
{
urlLoader.load(new URLRequest(file));
urlLoader.addEventListener(Event.COMPLETE,parseXML);
}
private function parseXML(ev:Event):void
{
xmlFile = new XML(ev.target.data);
ParseTeam2(xmlFile.children()[0]);
}
function ParseTeam2(bookInput:XML):void
{
trace("XML Output");
trace("------------------------");
trace(bookInput);
}
}
}
答案 0 :(得分:0)
var startTime:int = getTimer();
//parse xml...
trace("time passed: " + (getTimer() - startTime) + ", ms");