PDA

View Full Version : XML Question



71fnRVVm
November 30th, 2007, 07:41 AM
Hi everyone,

I'm rendering XML output to the browser (or AJAX request) using PHP, but Firefox isn't recognizing it as an XML file, and therefore not displaying it using the XML characteristics.

You can see a sample output:
http://www.myshoutoutloud.com/api/?user=KyleBrady&req=1&types=0

Right click, View Source... it looks fine, doesn't it?

Thanks

MicahCarrick
November 30th, 2007, 09:00 AM
Did you specify an XML mime type in the PHP file which outputs that using the header() function?

For example:


header('Content-Type: text/xml; charset=utf-8');

71fnRVVm
November 30th, 2007, 09:04 AM
Oh. No.

Let me try that.

Thanks

71fnRVVm
November 30th, 2007, 09:19 AM
Perfect!

Thanks again!