XMLTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : XMLTools : XMLTools/GetAttribute

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]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam