CodeIgniter Forums
Xml output - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Xml output (/showthread.php?tid=32636)



Xml output - El Forum - 07-29-2010

[eluser]gu4rd1an[/eluser]
My method
Code:
function connector()
    {
$data='<data>
    <event id="3">
        <start_date>2010-07-28 00:00:00</start_date>
        <end_date>2010-07-28 16:00:00</end_date>
        <text>&lt;![CDATA[Demo]]></text>
        <details>&lt;![CDATA[The Queens Club London, ENG]]></details>
    </event>
</data>';
header('Content-type: text/xml');
echo $data;
    }
returns
Quote:<data>
<event id="3">
<start_date>2010-07-28 00:00:00</start_date>
<end_date>2010-07-28 16:00:00</end_date>
<text>Demo</text>
<details>The Queens Club London, ENG</details>
</event>
&lt;style/&gt;
</data>

I can't figure why "&lt;style/&gt;" is in the output O_O
Hints?


Xml output - El Forum - 07-29-2010

[eluser]LuckyFella73[/eluser]
Running your code on my ci installation returns your output
without "&lt;style&gt;" and I can't imagine any reason why this lines
of code should produce the output you get when just running the
lines of code you posted.

Can you show more relevant code? In my opinion the error must
be elsewhere.