private function appendElement($name, $content = '', array $attributes = array())
{
$result = $this->_dom->createElementNs($this->_xmlns, $name);
if (!empty($content)) {
$text = $result->appendChild($this->_dom->createElementNs($this->_xmlns, 'text'));
if (trim($content) !== $content) {
$text->appendChild($this->_dom->createCDATASection($content));
} else {
$text->appendChild($this->_dom->createTextNode($content));
}
}
foreach ($attributes as $attribute => $value) {
$result->setAttribute($attribute, $value);
}
$this->_current->appendChild($result);
return $result;
}