I have this method
public function feedAction()
{
$articles = $this->getArticles();
$this->view->assign('articles', $articles);
$this->view->setTemplatePathAndFilename('EXT:Extension/Resources/Private/Templates/Feed/xml.html');
return $this->responseFactory->createResponse()
->withHeader('Content-Type', 'text/xml; charset=utf-8')
->withBody($this->streamFactory->createStream($this->view->render()));
}
this code gives me the complete html structure and then my template code. I just want xml code. how can i remove the templates etc.