Re: XML output from cake controller/view

2007-04-02 Thread Jeremy Pointer

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 
 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 > receiving the data (not mine) to cough and splutter and die.
>>
>> In my controller I am setting $this->layout=false; and my view is:
>> > header("Content-type:text/xml");
>> print ("");
>> print("");
>> foreach ($rows as $row) print("".$row['table']['field']."");
>> print("");
>> ?>
>>
>> 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] 
>>
>> 
>
> >   


-- 
*/Jeremy Pointer/*
[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
-~--~~~~--~~--~--~---



Re: XML output from cake controller/view

2007-04-02 Thread digital spaghetti

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

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  receiving the data (not mine) to cough and splutter and die.
>
> In my controller I am setting $this->layout=false; and my view is:
>  header("Content-type:text/xml");
> print ("");
> print("");
> foreach ($rows as $row) print("".$row['table']['field']."");
> print("");
> ?>
>
> 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] 
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



XML output from cake controller/view

2007-04-02 Thread Jeremy Pointer

I'm trying to output an xml document but I seem to be getting a space 
character just before layout=false; and my view is:
");
print("");
foreach ($rows as $row) print("".$row['table']['field']."");
print("");
?>

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] 

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---