(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveXml — Serializes the document as an XML string
Serializes the document as an XML string.
nodeThe node to serialize. If not provided, the entire document is serialized.
options
Zusätzliche Optionen.
Die Optionen LIBXML_NOEMPTYTAG und
LIBXML_NOXMLDECL werden unterstützt.
Vor PHP 8.3.0 wird nur die Option LIBXML_NOEMPTYTAG
unterstützt.
The serialized XML document string in the current
document encoding, or false on failure.
Wenn node von einem anderen Dokument stammt, wird eine
Dom\DOMException mit dem Code
Dom\WRONG_DOCUMENT_ERR ausgelöst.