Dom\HTMLDocument::saveXmlFile
(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveXmlFile — Serializes the document as an XML file
Description
Serializes the document as an XML file.
Parameters
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.
Return Values
The number of bytes written on success, or false on failure.
Errors/Exceptions
- Throws a ValueError if
filenameis an empty string or contains any null bytes.
See Also
- Dom\HTMLDocument::saveXml() - Serializes the document as an XML string
- Dom\HTMLDocument::saveHtmlFile() - Serializes the document as an HTML file
↑ and ↓ to navigate • Enter to select • Esc to close • / to open