/** * Return stringified XML document */ public function toString() { /* * End feed element */ $this->endElement(); /* * Write result */ return parent::toString(); }