'Return the value of the <presence> element as an integer.'

def get_priority(self):

    p = self._get_sub_text('priority')
    if (not p):
        p = 0
    try:
        return int(p)
    except ValueError:
        return 0
