Helpful Information
 
 
Category: XM
XML -> what header/application type?

Hi there,

I got a php-script that produces xml-code. So far so good. But the problem I have is, when viewing the xml-code in a browser it wouldnīt show as a regular xml-page would show (the tree thingy) but only as simple text. Now I checked the source code, and everything looks fine -> simple clean xml-code.

Now I wonder wether I am using a wrong header, so that the browser doesnīt understand that xml is coming?

That is what I use:

header ("Content-Type: application/xml"); echo '<?xml version="1.0" encoding="ISO-8859-1" ?>';

Try it without sending the header.

Try it without sending the header.

didnīt work either... but strangely WITH the header it works now all of a sudden... I donīt know why, but at least it works now ;)

didnīt work either... but strangely WITH the header it works now all of a sudden... I donīt know why, but at least it works now ;)