Page 1 of 1

xml output question

Posted: Mon Jul 07, 2003 3:20 am
by toshesh
whats wrong with my code? it displays everything in one line instead of the xml format.?? someone help? if this is to do with DOCTYPE then could someone tell me what that is exactly as well. thanks!!!!

echo "<?xml version='1.0'>";
echo "<dataSet>";
echo "<data>";
echo "<rownum>test</rownum>";
echo "<kid>blaa</kid>";
echo "<mname>bleee</mname>";
echo "<gtype>bloo</gtype>";
echo "</data>";
echo "</dataSet>";

Posted: Mon Jul 07, 2003 3:28 am
by mofo
echo "<?xml version='1.0'>";
echo "<dataSet>";
echo "<data>";
echo "<rownum>test</rownum>";
echo "<kid>blaa</kid>";
echo "<mname>bleee</mname>";
echo "<gtype>bloo</gtype>";
echo "</data>";
echo "</dataSet>";

Look at the first bold line. You are missing a ? before the closing >.

So instead of echo "<?xml version='1.0'>"; you should have
echo "<?xml version='1.0' ?>"; 8O

Posted: Mon Jul 07, 2003 4:45 am
by toshesh
oh yeah oops....

thanks!!!