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

Online Help

All Products    Maple    MapleSim


XMLTools

  

RemoveAttribute

  

remove an attribute from an XML element

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

RemoveAttribute(xmlTree, attrName)

Parameters

xmlTree

-

Maple XML tree; XML element

attrName

-

string; attribute name

Description

• 

The RemoveAttribute(xmlTree, attrName) command removes the attribute whose name is attrName from the XML element xmlTree. A new XML tree is returned that does not contain an attribute by this name.

  

If the input XML tree xmlTree has no attribute named attrName, then the input tree is returned. In cases such as this, there is no guarantee that the returned tree is distinct from the input tree.

Examples

withXMLTools:

xXMLElementa,colour=red,size=10,some text:

Printx

<a colour = 'red' size = '10'>some text</a>

PrintRemoveAttributex&comma;colour

<a size = '10'>some text</a>

PrintRemoveAttributex&comma;noSuchAttribute

<a colour = 'red' size = '10'>some text</a>

See Also

XMLTools

XMLTools[AddAttribute]

XMLTools[Attributes]

XMLTools[HasAttribute]

XMLTools[RemoveAttributes]

XMLTools[XMLAttribute]