def parse(cls, n, attr):
    """
    Convert the value for an ElementTree ``Element`` attribute to its Python representation.
    
    :param cls: A class with an ``ATTR_MAP`` property.
    :param n: An ElementTree ``Element`` object. 
    :param attr: The name of the attribute to parse.
    
    :raises: An ``Exception`` if an error occurs while parsing the value.
    
    :returns: The parsed attribute value. 
    """
    value = n.attrib[attr]
    if cls.ATTR_MAP.has_key(attr):
        f = cls.ATTR_MAP[attr]
        return f.parse(value)
    return value
