function getPath(\DOMDocument $document)
    {
        $name = $document->documentElement->localName;
        if (empty($this->version)) {
            $this->loadVersion($document);
        }
        $path = $this->getFullPath($name);

        return $path;
    }