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;
    }
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;
    }
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 ; }
loads the file as XML DOMDocument
@return \DomDocument
@throws \Exception
loads the file as XML DOMDocument