public static function importDom(DOMDocument $dom): SimpleXMLElement
    {
        $xml = \simplexml_import_dom($dom);

        if ($xml === false) {
            throw new ParseException(['message' => 'A failure happend on importing a DOMDocument.']);
        }

        return $xml;
    }