getAttributeOrDefault
Retrieves an attribute with the given key. If no attribute with the given key exists, the default value is returned.
Return
the attribute with the given key, or the default value if no attribute with the key exists
Parameters
key
the key of the attribute
default
the default value