src/Viserio/Component/Parser/Utils/XmlUtils.php
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;
    }
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;
    }
A simplexml_import_dom wrapper.

@param \DOMDocument $dom

@throws \Viserio\Component\Contract\Parser\Exception\ParseException

@return \SimpleXMLElement