开发者

How to calulate xml parsing time in actionscript 3?

I want to calculate the parsing time....

package {

    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
        {
            xmlFi开发者_开发问答le = new XML(ev.target.data);
            ParseTeam2(xmlFile.children()[0]);


        }
        function ParseTeam2(bookInput:XML):void
        {

            trace("XML Output");
            trace("------------------------");
            trace(bookInput);
        }

    }



}


var startTime:int = getTimer();

//parse xml...

trace("time passed: " + (getTimer() - startTime) + ", ms");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜