开发者

How to calulate xml parsing time in actionscript 3?

开发者 https://www.devze.com 2023-02-12 14:44 出处:网络
I want to calculate the parsing time.... package { import flash.display.MovieClip; import flash.net.URLLoader;

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

精彩评论

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