private function parseFileToDOM($file)
    {
        try {
            $dom = XmlUtils::loadFile($file, array($this, 'validateSchema'));
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e->getCode(), $e);
        }

        $this->validateExtensions($dom, $file);

        return $dom;
    }
private function parseFileToDOM($file)
    {
        try {
            $dom = XmlUtils::loadFile($file, array($this, 'validateSchema'));
        } catch (\InvalidArgumentException $e) {
            throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e->getCode(), $e);
        }

        $this->validateExtensions($dom, $file);

        return $dom;
    }
private function parseFileToDOM ( $ file ) { try { $ dom = XmlUtils :: loadFile ( $ file , array ( $ this , 'validateSchema' ) ) ; } catch ( \ InvalidArgumentException $ e ) { throw new InvalidArgumentException ( sprintf ( 'Unable to parse file "%s".' , $ file ) , $ e -> getCode ( ) , $ e ) ; } $ this -> validateExtensions ( $ dom , $ file ) ; return $ dom ; }
Parses a XML file to a \DOMDocument.

@param string $file Path to a file

@return \DOMDocument

@throws InvalidArgumentException When loading of XML file returns error
Parses a XML file to a \ DOMDocument .