public function __toString() { $children = ''; foreach ($this->tree as $node) { $children .= (string) $node; } return $this->body . $children . $this->close; }