src/XmlUtil.php
public static function createXmlDocument($docOptions = 0)
    {
        $xmldoc = new DOMDocument(self::XML_VERSION, self::XML_ENCODING);
        $xmldoc->preserveWhiteSpace =
            ($docOptions & XMLUTIL_OPT_DONT_PRESERVE_WHITESPACE) != XMLUTIL_OPT_DONT_PRESERVE_WHITESPACE
        ;
        $xmldoc->formatOutput = false;
        if (($docOptions & XMLUTIL_OPT_FORMAT_OUTPUT) == XMLUTIL_OPT_FORMAT_OUTPUT) {
            $xmldoc->preserveWhiteSpace = false;
            $xmldoc->formatOutput = true;
        }
        XmlUtil::$xmlNsPrefix[spl_object_hash($xmldoc)] = array();
        return $xmldoc;
    }
public static function createXmlDocument($docOptions = 0)
    {
        $xmldoc = new DOMDocument(self::XML_VERSION, self::XML_ENCODING);
        $xmldoc->preserveWhiteSpace =
            ($docOptions & XMLUTIL_OPT_DONT_PRESERVE_WHITESPACE) != XMLUTIL_OPT_DONT_PRESERVE_WHITESPACE
        ;
        $xmldoc->formatOutput = false;
        if (($docOptions & XMLUTIL_OPT_FORMAT_OUTPUT) == XMLUTIL_OPT_FORMAT_OUTPUT) {
            $xmldoc->preserveWhiteSpace = false;
            $xmldoc->formatOutput = true;
        }
        XmlUtil::$xmlNsPrefix[spl_object_hash($xmldoc)] = array();
        return $xmldoc;
    }
public static function createXmlDocument ( $ docOptions = 0 ) { $ xmldoc = new DOMDocument ( self :: XML_VERSION , self :: XML_ENCODING ) ; $ xmldoc -> preserveWhiteSpace = ( $ docOptions & XMLUTIL_OPT_DONT_PRESERVE_WHITESPACE ) != XMLUTIL_OPT_DONT_PRESERVE_WHITESPACE ; $ xmldoc -> formatOutput = false ; if ( ( $ docOptions & XMLUTIL_OPT_FORMAT_OUTPUT ) == XMLUTIL_OPT_FORMAT_OUTPUT ) { $ xmldoc -> preserveWhiteSpace = false ; $ xmldoc -> formatOutput = true ; } XmlUtil :: $ xmlNsPrefix [ spl_object_hash ( $ xmldoc ) ] = array ( ) ; return $ xmldoc ; }
Create an empty XmlDocument object with some default parameters

@param int $docOptions
@return DOMDocument object
Create an empty XmlDocument object with some default parameters