I realise this topic is more deceased than Monty Python's dead parrot, but I couldn't find any documentation about accessing attributes and kept finding myself back here, so if this stops someone else joining me in my rabbit hole, here's what I found ....
Attributes are stored as a dictionary, and can be accessed using (example snippet):
attributes = getObjectAttributes(item[0]) # Get list of attributes for item
for attribute in attributes: # For each attribute in current item
if attribute.get('Name') == "TOC": # If the attribute name is "TOC"
tocList[attribute.get('Value')] = page # Add/update the value of the attribute to/on the tocList
...
...
Fields which can be accessed are:
- Name
- Type
- Value
- Parameter
- Relationship
- RelationshipTo
- AutoAddTo
As I only needed to use Name and Value I didn't dive in any further, so can't comment further.