Page 1 of 1

how can I write xml in browser?

Posted: Mon Sep 04, 2006 1:34 pm
by saumya
I have tried all but no success.
echo();
HERE doc

but no luck
I just want to print
<XML>
<name>sam</name>
<phone>100</phone>
</xml>

Please help

Posted: Mon Sep 04, 2006 1:36 pm
by feyd
Want help? Post code.

Posted: Mon Sep 04, 2006 1:38 pm
by toasty2
Are you meaning, being able to put stuff between < and > without it being parsed? < or > is for actually displaying the less than or greater than sign. You question is unclear, please expand.

Edit: Are you telling it what to echo()? Try

Code: Select all

echo "stuff";
and replace stuff with what you want to output.

Posted: Mon Sep 04, 2006 1:39 pm
by Todd_Z

Code: Select all

header( 'Content-Type: text/xml' );

Posted: Mon Sep 04, 2006 9:17 pm
by saumya
thank you Todd_Z,
it worked.
Thank you so much.