/** * Returns a well-formed XML string based on SimpleXML element. * * @return string */ public function toXML() { if ($this->xmlObj instanceof XMLObj) { return $this->xmlObj->asXML(); } return false; }