Adds an XML constraint mapping file to the validator.
$this
public function addXmlMapping(string $path) : static { if (null !== $this->metadataFactory) { throw new ValidatorException('You cannot add custom mappings after setting a custom metadata factory. Configure your metadata factory instead.'); } $this->xmlMappings[] = $path; return $this; }