public function getVersion(\DOMDocument $document)
    {
        if (empty($document->documentElement)) {
            return '';
        }

        $xpath = $this->getXpath($document);
        $this->setNs($document);
        $xpath->registerNamespace('cbc', self::CBC_NS);

        return $this->getSingleValue($xpath, 'cbc:UBLVersionID');
    }