However what I get looks like a regular HTML page.
If I save the document to a file with .xml extention it is viewed as a tree in IE, however when generated dynamically it looks like a regular html document.
I hope I am expressing myself clearly. There are alot of new concepts here for me.
Here is a simplified example.
Code: Select all
<?php
header('Content-Type: text/xml; charset=UTF-8');
header('Content-Disposition: inline; filename="test.xml"');
echo "<?xml version='1.0' encoding='UTF-8'?>";
echo <<<BODY
<invoice>
<to>12345</to>
<from>TP937373</from>
<heading>Invoice Header</heading>
<body>Invoice Detail</body>
</invoice>
BODY;
?>