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

Online Help

All Products    Maple    MapleSim


XMLTools

  

HasAttribute

  

test whether an XML element has a specified attribute

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

HasAttribute(xmlTree, attrName)

Parameters

xmlTree

-

Maple XML tree; XML element

attrName

-

string; attribute name

Description

• 

The HasAttribute(xmlTree, attrName) command tests whether an attribute with the name attrName is present in the XML element xmlTree. The value true is returned if the attribute is present in xmlTree. Otherwise, false is returned.

Examples

withXMLTools:

xXMLElementa,b=c,some text:

Printx

<a b = 'c'>some text</a>

HasAttributex&comma;b

true

(1)

HasAttributex&comma;c

false

(2)

HasAttributex&comma;a

false

(3)

HasAttributex&comma;d

false

(4)

See Also

XMLTools

XMLTools[Attributes]

XMLTools[AttributeValue]

XMLTools[RemoveAttribute]

XMLTools[XMLElement]