Reading xml file created by php script

I am creating a xml file by reading MySQL database and formating the results into XML format and outputting it on the screen. I have created other php scripts that is supposed to read the that xml file but its not able to do so…am I doing something wrong? Just outputting the XML format to the screen does it make it readable for other php scripts? I can copy the output to a file and then all my other scripts work…please help:sen: