src/XmlUtil.php
public static function createXmlDocumentFromFile($filename, $docOptions = XMLUTIL_OPT_DONT_FIX_AMPERSAND)
    {
        if (!file_exists($filename)) {
            throw new XmlUtilException("Xml document $filename not found.", 250);
        }
        $xml = file_get_contents($filename);
        $xmldoc = self::createXmlDocumentFromStr($xml, $docOptions);
        return $xmldoc;
    }
public static function createXmlDocumentFromFile($filename, $docOptions = XMLUTIL_OPT_DONT_FIX_AMPERSAND)
    {
        if (!file_exists($filename)) {
            throw new XmlUtilException("Xml document $filename not found.", 250);
        }
        $xml = file_get_contents($filename);
        $xmldoc = self::createXmlDocumentFromStr($xml, $docOptions);
        return $xmldoc;
    }
public static function createXmlDocumentFromFile ( $ filename , $ docOptions = XMLUTIL_OPT_DONT_FIX_AMPERSAND ) { if ( ! file_exists ( $ filename ) ) { throw new XmlUtilException ( "Xml document $filename not found." , 250 ) ; } $ xml = file_get_contents ( $ filename ) ; $ xmldoc = self :: createXmlDocumentFromStr ( $ xml , $ docOptions ) ; return $ xmldoc ; }
Create a XmlDocument object from a file saved on disk.

@param string $filename
@param int $docOptions
@return DOMDocument
@throws \ByJG\Util\Exception\XmlUtilException
Create a XmlDocument object from a file saved on disk .