public function __toString() { $result = ''; foreach ($this->childNodes as $child) { $result .= (string) $child; } return $result; }