/**
  * apply given xml data as object data
  * also handling attributes
  *
  * @param $data string
  * @return $this
  */
 public function appendXml($data)
 {
     $xml = new Xml();
     $xml->preserveWhiteSpace = false;
     $bool = @$xml->loadXML($data);
     if (!$bool) {
         $this->_errorsList['xml_load_error'] = $data;
         $this->_hasErrors = true;
         return $this;
     }
     try {
         $temp = $this->_xmlToArray($xml->documentElement);
         $this->appendArray($temp);
     } catch (DOMException $exception) {
         $this->_addException($exception);
     }
     if ($this->_objectCreation) {
         return $this->_afterAppendDataToNewObject();
     }
     return $this;
 }