Validates a loaded XML file.
\DOMDocument $dom A loaded XML file:
\InvalidArgumentException When XML doesn't validate its XSD schema
protected function validate(\DOMDocument $dom) {
$location = __DIR__ . '/schema/routing/routing-1.0.xsd';
$current = libxml_use_internal_errors(true);
libxml_clear_errors();
if (!$dom
->schemaValidate($location)) {
throw new \InvalidArgumentException(implode("\n", $this
->getXmlErrors($current)));
}
libxml_use_internal_errors($current);
}