[eluser]daniel9201[/eluser]
I tried this on codeigniter 1.7.2, apache 2.2 on windows vista and windows xp.
I have a simple xml webservice i am developing being consumed by a Flex datagrid component.
I want to echo out a simple xml string
in my Controller, function testflex
Code:
$xml = '';
$xml .= "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
$xml .= "<entries>";
$xml .= "</entries>";
the above works fine, echos out fine
now i want to add data in.
Code:
// this is the new line that causes the output to add 2 line breaks at the start
$this->load->model('data_model');
$xml = '';
$xml .= "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
$xml .= "<entries>";
$xml .= "</entries>";
output now has 2 extra line breaks at the start that i don't want and they do cause an xml error for the consuming component.
See attached screen shots for the view of the source outputed to a browser.