When was it last serviced. Id assume the battery is failed. If it had no power to it it probably has at least 1 fault on it. You will need to find and fix the fault/faults.
Also an xm will not default when removing the power so if you dont know the code it wont reset anyway