XMLTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : XMLTools : XMLTools/ToString

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&equals;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]