After loading an xml file, get Error 1009 while trying to access it later

The error I get is:

null
TypeError: Error #1009: Cannot access a property or method of a null object reference.

Trace #1 confirms that the xml file was loaded successfully by loadXml(), but when I access the file in the timeline using the getStatus() method the object is null (trace #2).

Is there an obvious solution to this? Class code below…

package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;

public class readXml extends Sprite
{		
	public var xmlFile:XML;	
	private var urlLoader:URLLoader;
	
	public function readXml() 
	{
		
	}
	
	public function loadXml(xmlInputFileName:String):void 
	{
		urlLoader = new URLLoader();
		var myURLRequest:URLRequest = new URLRequest(xmlInputFileName);
		
		urlLoader.load(myURLRequest);
		urlLoader.addEventListener(Event.COMPLETE, completeListener); 
		urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorListener);
	}
	
	private function completeListener(e:Event):void 
	{
		xmlFile = new XML(urlLoader.data);
		trace(xmlFile.toString());  // Trace #1
	}

	private function ioErrorListener(e:Event):void 
	{
		trace("IO Error for XML data loading");
	}
		
	public function getStatus():void
	{
		trace(xmlFile.toString());  // trace #2
	}		
}

}

The timeline code is:

function createAndLoadXmlObject(xmlFile:String):readXml {
var xmlObject:readXml = new readXml();
xmlObject.loadXml(xmlFile);
return xmlObject;
}

var xmlExamObject:readXml = createAndLoadXmlObject(“myfile.xml”);
addChild(xmlExamObject);

xmlExamObject.getStatus();