http://qs1969.pair.com?node_id=601069


in reply to Print out an XML file to browser

Which setup are you using, i.e. which webserver, browser...? In case you're using Firefox, there's a nifty little extension LiveHTTPHeaders that allows you to watch which HTTP headers are being exchanged between browser and webserver.

If that doesn't help you to debug the "bad header" issue yourself, just post the respective headers that LiveHTTPHeaders (or some similar tool for your browser) is reporting.

The print header('text/xml'); suggested by virtualsue works fine for me (using Apache / Firefox), so I suppose your problem is no longer related to the script code itself...