XMLTools
GetAttribute
retrieve the value of an attribute from an XML element
Calling Sequence
Parameters
Description
Examples
GetAttribute(xmlTree, attrName)
xmlTree
-
Maple XML tree; XML element
attrName
string; attribute name
The GetAttribute(xmlTree, attrName) command retrieves the value of the attribute attrName from the XML element xmlTree as a Maple equation. If the specified attribute is not present, then the value FAIL is used as the right-hand side of the returned equation.
Note: The presence of an attribute with a given name is tested by using HasAttribute.
with⁡XMLTools:
GetAttribute⁡XMLElement⁡a,b=c,some text,b
b=c
GetAttribute⁡XMLElement⁡a,b=c,some text,d
d=FAIL
See Also
XMLTools[Attributes]
XMLTools[HasAttribute]
XMLTools[XMLElement]
Download Help Document