Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
XMLTools[AddAttribute] - add an attribute to an XML element
Calling Sequence
AddAttribute(xmlTree, attrName, attrValue)
AddAttribute(xmlTree, attr)
Parameters
xmlTree
-
Maple XML tree; XML element
attrName
string; attribute name
attrValue
string; attribute value
attr
equation of the form attrName = attrValue; attribute specification
Description
The AddAttribute(xmlTree, attr) command creates a new XML element from a given one by adding the specified attributes. The AddAttribute(xmlTree, attrName, attrValue) form of the calling sequence is equivalent to the AddAttribute(xmlTree, attr) form.
The input tree xmlTree must not already have an attribute with the specified attribute name . The behavior of this function is unspecified if the XML tree xmlTree already has an attribute named attrName.
The attribute encoded as attrName = attrValue is added to the attributes of xmlTree, and the new XML tree is returned. The position of the new attribute among any other attributes that may already exist in the tree is unspecified.
Examples
The next example returns an error since the attribute value is not of type string.
Error, (in XMLTools:-AddAttribute) invalid input: addAttribute2 expects its 2nd argument, attr, to be of type string = string, but received "size" = 2
See Also
XMLTools, XMLTools[RemoveAttribute]
Download Help Document