ToString - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


XMLTools

  

ToString

  

format an XML element as a Maple string

 

Calling Sequence

Parameters

Description

Examples

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

withXMLTools:

ToStringXMLElementelt,,content

<?xml version="1.0" encoding="ISO-8859-1"?> <elt>content</elt>

(1)

ToStringXMLElementa&comma;&comma;XMLElementb&comma;XMLElementc&comma;attr=val&comma;text

<?xml version="1.0" encoding="ISO-8859-1"?> <a><b/><c attr="val">text</c></a>

(2)

See Also

XMLTools

XMLTools[ParseString]

XMLTools[Print]