src/XmlUtil.php
public static function createDocumentFromNode(\DOMNode $node, $docOptions = 0)
    {
        $xmldoc = self::createXmlDocument($docOptions);
        XmlUtil::$xmlNsPrefix[spl_object_hash($xmldoc)] = array();
        $root = $xmldoc->importNode($node, true);
        $xmldoc->appendChild($root);
        return $xmldoc;
    }
public static function createDocumentFromNode(\DOMNode $node, $docOptions = 0)
    {
        $xmldoc = self::createXmlDocument($docOptions);
        XmlUtil::$xmlNsPrefix[spl_object_hash($xmldoc)] = array();
        $root = $xmldoc->importNode($node, true);
        $xmldoc->appendChild($root);
        return $xmldoc;
    }
public static function createDocumentFromNode ( \ DOMNode $ node , $ docOptions = 0 ) { $ xmldoc = self :: createXmlDocument ( $ docOptions ) ; XmlUtil :: $ xmlNsPrefix [ spl_object_hash ( $ xmldoc ) ] = array ( ) ; $ root = $ xmldoc -> importNode ( $ node , true ) ; $ xmldoc -> appendChild ( $ root ) ; return $ xmldoc ; }
Create a \DOMDocumentFragment from a node

@param DOMNode $node
@param int $docOptions
@return DOMDocument
Create a \ DOMDocumentFragment from a node