getType()) == 'atom') { return; } $this->_appendNamespaces(); $this->_setContent($this->_dom, $this->_base); } protected function _appendNamespaces() { $this->getRootElement()->setAttribute('xmlns:content', 'http://purl.org/rss/1.0/modules/content/'); } protected function _setContent(DOMDocument $dom, DOMElement $root) { $content = $this->getDataContainer()->getContent(); if (!$content) { return; } $element = $dom->createElement('content:encoded'); $root->appendChild($element); $element->nodeValue = htmlentities( $this->getDataContainer()->getContent(), ENT_QUOTES, $this->getDataContainer()->getEncoding() ); } }