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>";
xml output question
Moderator: General Moderators
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' ?>";
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' ?>";