array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'dom-htmldocument.savexmlfile.php', 1 => 'Dom\\HTMLDocument::saveXmlFile', 2 => 'Serializes the document as an XML file', ), 'up' => array ( 0 => 'class.dom-htmldocument.php', 1 => 'Dom\\HTMLDocument', ), 'prev' => array ( 0 => 'dom-htmldocument.savexml.php', 1 => 'Dom\\HTMLDocument::saveXml', ), 'next' => array ( 0 => 'class.dom-htmlelement.php', 1 => 'Dom\\HTMLElement', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/dom/dom/htmldocument/savexmlfile.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveXmlFile — Serializes the document as an XML file
Serializes the document as an XML file.
filename
options
LIBXML_NOEMPTYTAG
and LIBXML_NOXMLDECL
options are supported.
Prior to PHP 8.3.0, only the LIBXML_NOEMPTYTAG
option is supported.
The number of bytes written on success, or false
on failure.
filename
is an empty string or contains any
null bytes.