public function xml() { if ($this->_result) { $positions = array(0 => 0); $this->_addchild($this->_result['childs'], $this->xml, $positions); } return $this->xml->getSimpleXmlElement(); }