function XmlFileLoader::parseFile
Same name in this branch
- 11.1.x vendor/symfony/serializer/Mapping/Loader/XmlFileLoader.php \Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader::parseFile()
Loads the XML class descriptions from the given file.
Throws
MappingException If the file could not be loaded
1 call to XmlFileLoader::parseFile()
- XmlFileLoader::loadClassesFromXml in vendor/
symfony/ validator/ Mapping/ Loader/ XmlFileLoader.php
File
-
vendor/
symfony/ validator/ Mapping/ Loader/ XmlFileLoader.php, line 177
Class
- XmlFileLoader
- Loads validation metadata from an XML file.
Namespace
Symfony\Component\Validator\Mapping\LoaderCode
protected function parseFile(string $path) : \SimpleXMLElement {
try {
$dom = XmlUtils::loadFile($path, __DIR__ . '/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd');
} catch (\Exception $e) {
throw new MappingException($e->getMessage(), $e->getCode(), $e);
}
return simplexml_import_dom($dom);
}