Posted By

stur on 08/18/11


Tagged

php xml zend


Versions (?)

Zend output XML


 / Published in: PHP
 

  1. $this->_helper->layout()->disableLayout();
  2. $this->_helper->viewRenderer->setNoRender(true);
  3.  
  4. $xml = new DOMDocument('1.0', 'utf-8');
  5. $xml->appendChild($xml->createElement('video', 'link'));
  6. $output = $xml->saveXML();
  7.  
  8. Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer')->setNoRender(true);
  9. Zend_Layout::getMvcInstance()->disableLayout();
  10.  
  11. $this->_response->setHeader('Content-Type', 'text/xml; charset=utf-8')
  12. ->setBody($output);

Report this snippet  

You need to login to post a comment.