GetAttribute - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


XMLTools

  

GetAttribute

  

retrieve the value of an attribute from an XML element

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GetAttribute(xmlTree, attrName)

Parameters

xmlTree

-

Maple XML tree; XML element

attrName

-

string; attribute name

Description

• 

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.

Examples

withXMLTools:

GetAttributeXMLElementa,b=c,some text,b

b=c

(1)

GetAttributeXMLElementa,b=c,some text,d

d=FAIL

(2)

See Also

XMLTools

XMLTools[Attributes]

XMLTools[HasAttribute]

XMLTools[XMLElement]