The post that you want to link this about is not resolving my problem I copy pasted that code and it is still not printing the result as xml format.
I want to create a xml format output from a string, but don't know why it is not working if you can recommend another way to do that.
<?php
@date_default_timezone_set("GMT");
header("Content-type: text/xml");
//xml string
$xml_string=
"<?xml version='1.0'?>
<users>
<user id='398'>
<name>Foo</name>
<email>foo@bar.com</email>
</user>
<user id='867'>
<name>Foobar</name>
<email>foobar@foo.com</email>
</user>
</users>";
echo $xml_string;
?>