Print - Maple Help

Online Help

All Products    Maple    MapleSim


XMLTools

  

Print

  

print an XML document with elements indented

  

PrintToFile

  

print an XML document with elements indented to a disk file

  

PrintToString

  

print an XML document with elements indented to a string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Print(xmlTree)

PrintToFile(fileName, xmlTree)

PrintToString(xmlTree)

Parameters

xmlTree

-

Maple XML tree or a string; XML document

fileName

-

string; filename

Description

• 

The Print(xmlTree) command formats an XML document so that its elements are indented as it is displayed on the default display device.

• 

The PrintToFile(fileName, xmlTree) command is similar to the Print command, except that the formatted XML document is written to the file fileName.

• 

The PrintToString(xmlTree) command formats the XML document and returns a Maple string containing the result. This allows you to pass the formatted XML to other procedures that can further process the document.

• 

A string containing valid XML data can be passed in place of a parsed tree data structure, in which case the string is first parsed, and then printed as though the resulting tree were passed directly.

Examples

xmls<a><!-- An XML comment --><b c='d'>Some Text <here></b></a>&colon;

withXMLTools&colon;

PrintParseStringxmls

  <a>
    <!--  An XML comment  -->
    <b c = 'd'>Some Text <here></b>
  </a>

See Also

filenames

XMLTools

XMLTools[CleanXML]

XMLTools[ContentModel]

XMLTools[ParseString]