Failure to Read XML

All,
I made an XML file and then replicated that in a PHP file. I then just executed my PHP file and then viewed the source of it and then copied that into an XML file and had my AS read that file it works fine. However, when I have it set up to read my PHP file and I test it in Flash it gives me the following error:

TypeError: Error #1090: XML parser failure: element is malformed.

at Function/<anonymous>()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

Here is my code to read the XML file:


private var xmlURL:String = 'xml/createxml.php';
public function Main(param:MovieClip) {
			
_root = param;
//trace("BeginLoadXml")
			
xmlLoader = new URLLoader();

xmlLoader.addEventListener(Event.COMPLETE, showXML);
xmlLoader.addEventListener(ProgressEvent.PROGRESS, traceLoaderXML);

xmlLoader.load(new URLRequest(xmlURL));
XML.ignoreWhitespace = true;

function traceLoaderXML(eventXML:ProgressEvent) {
	pcentXML = int(eventXML.bytesLoaded / eventXML.bytesTotal * 100);
	MovieClip(root).xml_load.thisText.text = 'Loading xml';
	MovieClip(root).xml_load.thisText.autoSize = TextFieldAutoSize.CENTER;
	//trace(pcentXML);
}
function showXML(e:Event):void {
        websiteXML = new XML(e.target.data);
    	MovieClip(root).gotoAndPlay(3);
     	//trace(websiteXML);
     	popupFunction();
}
}

Any ideas on what is wrong?? Thanks for the help in advance.