XMLTools[Serialize] - return a Maple expression as XML
|
Calling Sequence
|
|
Serialize(expr)
|
|
Parameters
|
|
expr
|
-
|
anything; expression to use
|
|
|
|
|
Description
|
|
•
|
The Serialize(expr) function converts Maple expressions to XML documents and formats them. The returned result shows the structure of the expression.
|
|
Note: Because XML standards are subject to change, the returned XML document structure may change. Therefore, it should not be regarded as a storage format for Maple expressions.
|
•
|
This function is part of the XMLTools package, and so it can be used in the form Serialize(..) only after executing the command with(XMLTools). However, it can always be accessed through the long form of the command by using the form XMLTools[Serialize](..).
|
|
|
Examples
|
|
>
|
|
>
|
|
<SUM>
<NAME>a</NAME>
<NAME>b</NAME>
</SUM>
| |
>
|
|
<SERIES>
<PROD>
<INTPOS>
1
</INTPOS>
<POWER>
<NAME>x</NAME>
<INTPOS>
0
</INTPOS>
</POWER>
</PROD>
<PROD>
<INTPOS>
1
</INTPOS>
<POWER>
<NAME>x</NAME>
<INTPOS>
1
</INTPOS>
</POWER>
</PROD>
<PROD>
<RATIONAL>
<INTPOS>
1
</INTPOS>
<INTPOS>
2
</INTPOS>
</RATIONAL>
<POWER>
<NAME>x</NAME>
<INTPOS>
2
</INTPOS>
</POWER>
</PROD>
<PROD>
<RATIONAL>
<INTPOS>
1
</INTPOS>
<INTPOS>
6
</INTPOS>
</RATIONAL>
<POWER>
<NAME>x</NAME>
<INTPOS>
3
</INTPOS>
</POWER>
</PROD>
<PROD>
<RATIONAL>
<INTPOS>
1
</INTPOS>
<INTPOS>
24
</INTPOS>
</RATIONAL>
<POWER>
<NAME>x</NAME>
<INTPOS>
4
</INTPOS>
</POWER>
</PROD>
<PROD>
<RATIONAL>
<INTPOS>
1
</INTPOS>
<INTPOS>
120
</INTPOS>
</RATIONAL>
<POWER>
<NAME>x</NAME>
<INTPOS>
5
</INTPOS>
</POWER>
</PROD>
<FUNCTION>
<NAME>
O
<ATTRIBUTE>
<NAME>
protected
<ATTRIBUTE>
<NAME>protected</NAME>
</ATTRIBUTE>
</NAME>
</ATTRIBUTE>
</NAME>
<EXPSEQ>
<POWER>
<NAME>x</NAME>
<INTPOS>
6
</INTPOS>
</POWER>
</EXPSEQ>
</FUNCTION>
</SERIES>
| |
>
|
Serialize( proc(x) 1 - 2/x end );
|
<PROC>
<PARAMSEQ>
<NAME>x</NAME>
</PARAMSEQ>
<LOCALSEQ/>
<OPTIONSEQ/>
<EXPSEQ/>
<STATSEQ>
<SUM>
<INTPOS>
1
</INTPOS>
<PROD>
<POWER>
<PARAM>
1
</PARAM>
<INTNEG>
1
</INTNEG>
</POWER>
<INTNEG>
2
</INTNEG>
</PROD>
</SUM>
</STATSEQ>
<DESCRIPTIONSEQ/>
<GLOBALSEQ/>
<LEXICALSEQ/>
<EOP>
<EXPSEQ/>
</EOP>
</PROC>
| |
|
|
Download Help Document
Was this information helpful?