original_string: public function loadAsXML()
      {
          $this->checkFileExists();
          $xml = new \DomDocument ();
          libxml_use_internal_errors(true);
          $result = $xml->load($this->absoluteFileName);
          if ($result) {
              return $xml;
          }
          $messageObject = ArrayUtil::getFromArray(libxml_get_errors(), 0);
          $libXMLMessage = ObjectUtil::getFromObject($messageObject, "message");
          $message = sprintf(self::EXCEPTION_INVALID_XML, $this->absoluteFileName, $libXMLMessage);
          $e = new \Exception(libxml_get_errors()[0]->message);
          libxml_clear_errors();
          throw $e;
      }
code: public function loadAsXML()
      {
          $this->checkFileExists();
          $xml = new \DomDocument ();
          libxml_use_internal_errors(true);
          $result = $xml->load($this->absoluteFileName);
          if ($result) {
              return $xml;
          }
          $messageObject = ArrayUtil::getFromArray(libxml_get_errors(), 0);
          $libXMLMessage = ObjectUtil::getFromObject($messageObject, "message");
          $message = sprintf(self::EXCEPTION_INVALID_XML, $this->absoluteFileName, $libXMLMessage);
          $e = new \Exception(libxml_get_errors()[0]->message);
          libxml_clear_errors();
          throw $e;
      }
code_tokens: public function loadAsXML ( ) { $ this -> checkFileExists ( ) ; $ xml = new \ DomDocument ( ) ; libxml_use_internal_errors ( true ) ; $ result = $ xml -> load ( $ this -> absoluteFileName ) ; if ( $ result ) { return $ xml ; } $ messageObject = ArrayUtil :: getFromArray ( libxml_get_errors ( ) , 0 ) ; $ libXMLMessage = ObjectUtil :: getFromObject ( $ messageObject , "message" ) ; $ message = sprintf ( self :: EXCEPTION_INVALID_XML , $ this -> absoluteFileName , $ libXMLMessage ) ; $ e = new \ Exception ( libxml_get_errors ( ) [ 0 ] -> message ) ; libxml_clear_errors ( ) ; throw $ e ; }
docstring: loads the file as XML DOMDocument
  @return \DomDocument
  @throws \Exception
docstring_tokens: loads the file as XML DOMDocument