private function appendText($content) { $text = $this->_current->appendChild($this->_dom->createElementNs($this->_xmlns, 'text')); if (trim($content) !== $content) { $text->appendChild($this->_dom->createCDATASection($content)); } else { $text->appendChild($this->_dom->createTextNode($content)); } return $text; }