def is_xml(filename):
    """Determine whether file is XML by checking extension"""
    if filename.split('.')[-1] == 'gz':
        return filename.split('.')[-2] == 'xml'
    else:
        return filename.split('.')[-1] == 'xml'
