original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: apply given xml data as object data
  also handling attributes
  
  @param $data string
  @return $this
docstring_tokens: apply given xml data as object data also handling attributes