def METHOD_NAME(element, entry):
    value = element.find(entry)
    if value is not None:
        value = value.text.strip()
    elif entry in element.attrib:
        value = element.attrib[entry].strip()
    else:
        value = None
    return value