public function addText($text) { foreach ($this->nodes as $n) { $n->appendChild(new \DOMText($text)); } return $this; }