|
DOMDocument::saveXMLDumps the internal XML tree back into a string Description
public stringfalse DOMDocument::saveXML(DOMNodenull
$node = null, int $options = 0)Creates an XML document from the DOM representation. This function is usually called after building a new dom document from scratch as in the example below. Parameters
Return Values
Returns the XML, or Errors/ExceptionsMay throw a DOMException with the following error codes:
Changelog
Examples
Example #1 Saving a DOM tree into a string The above example will output: Saving all the document: <?xml version="1.0"?> <book> <title>This is the title</title> </book> Saving only the title part: <title>This is the title</title> See Also
|