ToString - Maple Help

XMLTools

 ToString
 format an XML element as a Maple string

 Calling Sequence ToString(xmlTree)

Parameters

 xmlTree - Maple XML tree; XML element

Description

 • The ToString(xmlTree) command formats the XML element xmlTree as an XML document (stored as a Maple string).
 The returned XML document is formatted without line breaking or indentation of any kind. As a result, regardless of size, the document is returned as a single line of text. To display the output in a more readable format, use Print.

Examples

 > $\mathrm{with}\left(\mathrm{XMLTools}\right):$
 > $\mathrm{ToString}\left(\mathrm{XMLElement}\left("elt",\left[\right],"content"\right)\right)$
 ${" content"}$ (1)
 > $\mathrm{ToString}\left(\mathrm{XMLElement}\left("a",\left[\right],\mathrm{XMLElement}\left("b"\right),\mathrm{XMLElement}\left("c",\left["attr"="val"\right],"text"\right)\right)\right)$
 ${" text"}$ (2)