public function setComment($text) { foreach ($this->nodes as $n) { $n->nodeValue = ''; $n->appendChild(new \DOMComment($text)); } return $this; }