Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
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>
See Also
XMLTools, XMLTools[Print]
Download Help Document