First off, sorry if this is a duplicate, I submitted a post an hour
ago and it still hasn't shown up so I thought I'd try one more time.

I'm having extreme difficulty getting cakephp to render xml for me.
I've looked through the google groups, the docs, and blog posts via
google and as far as I can tell I've done everything that has been
suggested.

In my routes file:
Router::parseExtensions("xml");

In my controller:
var $components = array('RequestHandler');

function data(){
        $message = 'Testing';
        $this->set('message', $message);
}

I've verified that app/data.xml tries to render views/app/xml/data.ctp
and also views/layouts/xml/default.ctp (if I create it)

In views/app/xml/data.ctp:
<test>
    <case><?php echo $message; ?></case>
</test>

However, when I navigate to app/data.xml this is what is returned:
 <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <title></title>
  </head>
  <body>
    Testing <!-- 0.1864s -->
  </body>

</html>

I've ran out of ideas, does anyone have any suggestions to get this
working?

Thanks in advance for any insights you can provide and again, sorry if
this posts twice.

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