Forum Moderators: coopster

Message Too Old, No Replies

IE6 won't parse XML created using PHP

         

SteveCA

11:30 pm on Apr 2, 2003 (gmt 0)

10+ Year Member



i'm having a lot of problems with this. at first i got a parse error in php from:

<?xml version="1.0" encoding="ISO-8859-1"?>

which i changed to:

echo '<?xml version="1.0" encoding="ISO-8859-1"?>' ;

this seemed to work fine for a couple of days. then all of a sudden IE decided it didn't want to parse the XML anymore. i've tried so many things like <?php tags instead of <? tags etc. i also made a simple file:

<? echo '<?xml version="1.0" encoding="ISO-8859-1"?>'?>

and it seemed to like that, however, when i did anything like:

<?

echo '<?xml version="1.0" encoding="ISO-8859-1"?>';

include ("../headFoot.php")

xmlHeader("Page Title");
xmlFooter();

?>

it doesn't work. i also just took all the XML created from xmlHeader and xmlFooter, placed it in a file test.xml, and it worked just dandy. neadless to say it's very frusterating having it work and then just die all of a sudden. anyone have any ideas? for reference, i have a single php file index.php which in essense has a switch statement that calls other php files in behind the pub_html folder based on an action. index.php?action=page3 for example. is this not going to work for xml? is there a special formula that i need to follow for creating xml pages using php?

thanks,
steve

Gibble

11:37 pm on Apr 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, I have that problem on occasion, try setting the content type to xml.

header("Content-type: text/xml\n\n");

SteveCA

5:18 am on Apr 3, 2003 (gmt 0)

10+ Year Member



well it seems to be working
thanks :D