Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. XmlFileLoader.php

function XmlFileLoader::parseFile

Same name in this branch
  1. 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\Loader

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal