Hello,

I have an Ajax that requests XML feed to one of my CakePHP action.

My action works great and returns something like:-

<?xml version="1.0" encoding="ISO-8859-1" ?>
<item id="1" text="Mes catégories">
</item>

So far so good... with IE, because my Ajax does not work with
Mozilla!
Mozilla returns the following error message when accessing the action
that ough to return the XML directly:-

XML Parsing Error: XML or text declaration not at start of entity
Location: http://localhost/dnp/toto_trees/tree
Line Number 2, Column 1:<?xml version="1.0" encoding="ISO-8859-1" ?>
^

I looked in the source of this page and I can see that the page starts
with a blank line (line feed) - Mozilla complains about it, an XML
document should start immediatly with <?xml version="1.0"
encoding="ISO-8859-1" ?> ...

In my Controller:-

function toto() {
     $this->render( null, '/xml/default', null );
}

In my .ctp:-
<item id="1" text="Mes catégories">
</item>

In my layout:-
<?php
echo $content_for_layout;
Configure::write('debug', 0);
?>


Thus I don't see where this line feed comes from - Can you help or
give me a workaround?

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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