Esempio n. 1
0
 public static function replaceNodeContent($sContent, DOMNode $oNode)
 {
     DOMParser::emptyNodeContent($oNode);
     $oTMPContentDocument = new DOMDocument();
     $oTMPContentDocument->loadXML('<root>' . $sContent . '</root>');
     foreach ($oTMPContentDocument->firstChild->childNodes as $oChildNode) {
         $oInsertedNode = $oNode->ownerDocument->importNode($oChildNode, true);
         $oNode->appendChild($oInsertedNode);
     }
 }
Esempio n. 2
0
 protected function _render()
 {
     DOMParser::emptyNodeContent($this->_oNode);
     // TODO : use pubdate if member of article !
     $this->_oNode->setAttribute('datetime', date(DATE_W3C, $this->datetime));
     if (is_null(self::$_sLocale)) {
         $this->_setLocale();
     }
     $this->_oNode->appendChild(new DOMText(strftime($this->format, $this->datetime)));
 }
Esempio n. 3
0
 protected function _render()
 {
     DOMParser::emptyNodeContent($this->_oNode);
     $this->_oNode->appendChild(new DOMText(str_replace('&amp;', '&', $this->content)));
 }
Esempio n. 4
0
 protected function _render()
 {
     DOMParser::emptyNodeContent($this->_oNode);
     $this->_oNode->setAttribute('href', '/download/' . $this->ref . '/' . $this->file);
     $this->_oNode->appendChild(new DOMText(str_replace('&amp;', '&', $this->label)));
 }