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[XMLElement] - general XML element constructor
Calling Sequence
XMLElement(s, attrList, children)
Parameters
s
-
string; name of the XML element to create
attrList
(optional) list of equations whose left and right sides are strings; attribute equations in the form , where is the attribute name and is the attribute value
children
(optional) sequence or list of XML tree data structures returned by previous calls to the constructor, or other routines that produce XML trees; children of the XML tree
Description
The XMLElement(s, attrList, children) command is the primary constructor used to create XML elements in Maple.
The first argument s is always the name of the element that is created. If no further arguments are included in the calling sequence, then an empty XML element is constructed and returned.
The attrList parameter represents the attributes of the newly constructed element.
If the third argument children is also a list, then it is taken to be a list of all the child elements to place inside the newly formed element returned by the XMLElement constructor.
If the arguments after the second argument are not of type list, they are interpreted as being child elements of the tree node.
If the second argument is not of type list, then all arguments after the first argument are taken to be children of the tree node that is constructed.
Examples
<a/>
<a colour = 'red'/>
<a>some content</a>
<a> <b colour = 'blue'/> </a>
<a> some content <b colour = 'blue'/> </a>
<a colour = 'red'> some content <b colour = 'blue'/> </a>
<a colour = 'red' style = 'italic'> some content <b colour = 'blue'>more text</b> still more text </a>
See Also
XMLTools, XMLTools[IsElement]
Download Help Document