def strip_text(xml_array, tag, text_type, default):
    """
    Parses XML attributes along the same level
    :param xml_array: XML attributes (list)
    :param tag: name of XML tag to search for (str)
    :param text_type: what type the field contents are expected to be (data type)
    :param default: default value if tag field is empty or does not match data type
    :return: str if text_type is str, else list
    """

    data = [item.text if isinstance(item.text, text_type) else default for item in xml_array if xml_array.tag == tag]
    if text_type == str:
        return ". ".join(data)
    return data