Set Attribute
- Last UpdatedJun 02, 2022
- 1 minute read
As for getting attributes, there is a family of methods for setting attributes depending on the attribute type.
ele.SetAttribute(ATT.DESC, "Example description");
There are no methods that take a qualifier.
The code should always be prepared to handle any exceptions raised.
There is a boolean method IsAttributeSetable to test if a given attribute may be set. This does not take the new value, so it is possible that the actual setting will still fail if the new value is invalid.