def is_grb(v):
    """
    Tests to see if this XML packet is a Gamma Ray Burst event (SWIFT or Fermi alert).

    :param v: string in VOEvent XML format
    :return: Boolean, True if this event is a GRB.
    """
    ivorn = v.attrib['ivorn']

    trig_list = ["ivo://nasa.gsfc.gcn/SWIFT#BAT_GRB_Pos", ]
    swift_fermi = False
    for t in trig_list:
        if ivorn.find(t) == 0:
            swift_fermi = True
            break
    if not swift_fermi:
        return False
    else:
        grbid = v.find(".//Param[@name='GRB_Identified']").attrib['value']
        if grbid != 'true':
            return False
    return True