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[ReplaceChild] - replace a child node of an XML tree
Calling Sequence
ReplaceChild( spec, xmlTree )
Parameters
spec
-
equation acceptable to subsop
xmlTree
Maple XML tree; XML element
Description
The ReplaceChild(spec, xmlTree) command replaces a specific child of an XML document tree with new content.
The first argument is an equation whose left-hand side specifies which child to replace, and whose right-hand side is the replacement content. The syntax mimics that of subsop. A new XML document tree is returned with the replacement content appearing instead of the child element specified in the left-hand side of the first argument.
Examples
<a> <b colour = 'red'>foo</b> <c colour = 'blue'>bar</c> <d>baz</d> </a>
<a> <b colour = 'red'>foo</b> <NEW>text</NEW> <d>baz</d> </a>
See Also
subsop, XMLTools, XMLTools[GetChild], XMLTools[RemoveChild], XMLTools[XMLElement]
Download Help Document