Dom\HTMLDocument::saveXmlFile
(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveXmlFile — Serializes the document as an XML file
说明
Serializes the document as an XML file.
参数
filename- The path to the file to save to.
options-
Additional Options.
The
LIBXML_NOEMPTYTAGandLIBXML_NOXMLDECLoptions are supported. Prior to PHP 8.3.0, only theLIBXML_NOEMPTYTAGoption is supported.
返回值
The number of bytes written on success, or false on failure.
错误/异常
-
Throws a ValueError if
filenameis an empty string or contains any null bytes.
参见
- Dom\HTMLDocument::saveXml() - Serializes the document as an XML string
- Dom\HTMLDocument::saveHtmlFile() - Serializes the document as an HTML file
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/dom-htmldocument.savexmlfile.php