WriteFile - Maple Help

XMLTools

 WriteFile
 write a Maple XML tree data structure to a file as an XML document

 Calling Sequence WriteFile(fileName, xmlTree)

Parameters

 fileName - string; name of file xmlTree - Maple XML tree; XML element

Description

 • The WriteFile(fileName, xmlTree) function writes the specified XML element xmlTree in the form of a string to the file fileName. The string is produced by using ToString, and a newline character is appended as the resulting string is written to the file. The number of bytes written is returned.
 It is assumed that the XML element that is written to the file is well-formed. (This is not checked by Maple.)
 • This function is part of the XMLTools package, and so it can be used in the form WriteFile(..) only after executing the command with(XMLTools). However, it can always be accessed through the long form of the command by using the form XMLTools[WriteFile](..).

Examples

 > $\mathrm{with}\left(\mathrm{XMLTools}\right):$
 > $\mathrm{WriteFile}\left("temp.xml",\mathrm{xmlTree}\right)$