digital spaghetti wrote:
> Instead of your method, check out this tutorial:
>
> http://bakery.cakephp.org/articles/view/2
>
> Its an old article, but still works perfectly in Cake 1.2
>   
I had already tried that method i.e. created an xml layout with just 
header() and print("?xml.... but I was still getting the space all that 
example does is move the output from the view to layout+view.
As it happens a new day brought an answer I simply removed the 
<?xml....?> part from the output and problem solved, I'd still like to 
know where the space is coming from though.
> Tane
>
> On 4/2/07, Jeremy Pointer <[EMAIL PROTECTED]> wrote:
>   
>> I'm trying to output an xml document but I seem to be getting a space
>> character just before <?xml...... which is causing the application
>> receiving the data (not mine) to cough and splutter and die.
>>
>> In my controller I am setting $this->layout=false; and my view is:
>> <?php
>> header("Content-type:text/xml");
>> print ("<?xml version=\"1.0\"?>");
>> print("<somedata>");
>> foreach ($rows as $row) print("<arow>".$row['table']['field']."</arow>");
>> print("</somedata>");
>> ?>
>>
>> DEBUG is 0 I also tried removing all beforeFilter and beforeRender
>> settings in app_controller and the controller that calls this with no luck.
>>
>> Any ideas why I am getting a space, is there a different/better way to
>> output XML.
>>
>> --
>> */Jeremy Pointer/*
>> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>
>>     
>
> >   


-- 
*/Jeremy Pointer/*
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to