Neos\ContentRepository\Domain\Service\ImportExport\NodeImportService::determineFormatVersion PHP Method

determineFormatVersion() protected method

Determines the ContentRepository format version of the given xml
protected determineFormatVersion ( XMLReader $xmlReader ) : null | string
$xmlReader XMLReader
return null | string the version as a string or null if the version could not be determined
    protected function determineFormatVersion(\XMLReader $xmlReader)
    {
        while ($xmlReader->nodeType !== \XMLReader::ELEMENT || $xmlReader->name !== 'nodes') {
            if (!$xmlReader->read()) {
                break;
            }
        }
        if ($xmlReader->name === 'nodes' && $xmlReader->nodeType === \XMLReader::ELEMENT) {
            return $xmlReader->getAttribute('formatVersion');
        }
        return false;
    }