Zend Framework provides a way for that output xml.
Please do check the ContextSwitch action helper documentation.
The only thing you might want to change is force XML context in controller's init() method.
<?php
class SitemapController extends Controller_Action
{
public function init()
{
$contextSwitch = $this->_helper->getHelper('contextSwitch');
$contextSwitch->addActionContext('index', 'xml')->initContext('xml');
}
public function indexAction()
{
}
}
And ,the view script changed to index.xml.phtml ,not the index.phtml
Also , it will auto use http header Content-type: application/xml
Date: 2012-01-16 08:04:46 and last modified: 2012-01-16 08:08:49
Recent entries:
- Emacs rainbow mode
- Squirm a url rewriter for squid
- How to use rsync for transferring files over ssh
- Vide: GRE tunnel
- Video: how to install freebsd
- Video: Install zend framework
- Video: Install Window7 from network
- Install Window7 from a PXE Boot server (Linux/FreeBSD)
- Create GRE tunnel with FreeBSD8
- What's cooking for FreeBSD 9