The following examples demonstrate how a Maple XML tree data structure can be converted and returned as a string.
The ToString command converts the XML tree data structure doc and returns it as a Maple string str.
The string str is parsed and converted back to an XML tree data structure doc1 by using the FromString command.
The Display command launches the worksheets. The Display command launches the string str and the XML tree doc1. For information on Display command parameters, see Worksheet[Display].