def split_tag(tag):
    """
    parse an xml tag into the tag itself and the tag index
    Parameters
    ----------
    tag : str
        xml tag that might or might not have a [n] item

    Returns
    -------
    tuple: fgdc_tag, index
    """
    if '[' in tag:
        fgdc_tag, tag = tag.split('[')
        index = int(tag.split(']')[0])-1
    else:
        fgdc_tag = tag
        index = 0
    return fgdc_tag, index