Parses a XML file.
string $file Path to a file:
InvalidArgumentException When loading of XML file returns error
protected function parseFile($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 simplexml_import_dom($dom, 'Symfony\\Component\\DependencyInjection\\SimpleXMLElement');
}