SYNOPSISint xmlTreeSaveDoc(xmlDoc doc, string filename,
[, string encoding] [, string options])
Parameters:
doc
- the xmlDoc
to be saved to a file.filename
- the file to save doc
toencoding
(optional) - the character encoding to
use. Default is UTF-8
.options
(optional) - the options to use when saving
(see below)
Returns:
-1
in the case of error.
DESCRIPTIONxmlTreeSaveDoc()
writes the XML document doc
to the file
filename
.
The possible values for options
are:
INDENT
- add extra whitespace text nodes to indent the
output. See xmlTreePrintDoc()
for examples.
EXAMPLE<$numBytes = (xmlTreeSaveDoc($doc, 'output.xml'))>
SEE ALSOxmlTreePrintDoc