WordPress at a glance
function is not described

saveDomDocument() WP 2.8.0

Saves the XML document into a file

No Hooks.

Return

Nothing (null).

Usage

saveDomDocument( $doc, $filename );
$doc(DOMDocument) (required)
$filename(string) (required)

Code of saveDomDocument: wp-admin/includes/misc.php VER 5.1.1

<?php
function saveDomDocument( $doc, $filename ) {
	$config = $doc->saveXML();
	$config = preg_replace( "/([^\r])\n/", "$1\r\n", $config );
	$fp     = fopen( $filename, 'w' );
	fwrite( $fp, $config );
	fclose( $fp );
}