public function read(string $xmlFile): array
    {
        try {
            $dom = XmlUtils::loadFile($xmlFile, $this->xsdFile);
        } catch (\Exception $e) {
            throw new XmlParsingException($xmlFile, $e->getMessage());
        }

        return $this->parseFile($dom);
    }
public function read(string $xmlFile): array
    {
        try {
            $dom = XmlUtils::loadFile($xmlFile, $this->xsdFile);
        } catch (\Exception $e) {
            throw new XmlParsingException($xmlFile, $e->getMessage());
        }

        return $this->parseFile($dom);
    }
public function read ( string $ xmlFile ) : array { try { $ dom = XmlUtils :: loadFile ( $ xmlFile , $ this -> xsdFile ) ; } catch ( \ Exception $ e ) { throw new XmlParsingException ( $ xmlFile , $ e -> getMessage ( ) ) ; } return $ this -> parseFile ( $ dom ) ; }
load and validate xml file - parse to array

@throws XmlParsingException
load and validate xml file - parse to array