4.1 AttributeList methods

The AttributeList class supports some of the behaviour of Python dictionaries; the len(), has_key(), keys() methods are available, and attr['href'] will retrieve the value of the href attribute. There are also additional methods specific to AttributeList:

getLength ()
Return the number of attributes in the list.

getName (i)
Return the name of attribute i in the list.

getType (i)
Return the type of an attribute in the list. i can be either the integer index or the attribute name.

getValue (i)
Return the value of an attribute in the list. i can be either the integer index or the attribute name.