Limit to lenght of xml?

i’m loading a database generated xml file that is pretty long(7000 lines). everything seem so work but it gets hung up when i’m trying to create a new xml object.

from below if i comment out 3) then i can see the xml displayed in my test text field but with line 3) in there it hangs. it seems like it’s hanging trying to create the new XML object. is there a limit to the length the new XML object can be? any ideas why this wouldn’t work?

var xml:XML;
var loader=new URLLoader;
loader.load(new URLRequest(xmlPath));
loader.addEventListener(Event.COMPLETE,xmlLoaded);

//this is the function called
1)function xmlLoaded(e:Event):void {

  1. if (e.target as URLLoader!=null) {

    //Create a new XML object with the loaded XML data

  2.  xml=new XML(loader.data);
    
  3.    testTxt.text = loader.data;
     
     createMenu(1,0); 
     createTopTabs(1);
    

    }
    }