The seizures happen if you quit cold turkey. If you wean slowly under a psychiatrist's care, they can monitor you, and if you need anti-seizure medication as you taper they can determine that, too.
Taking Xanax while pregnant is a big NO! You can successfully wean off of it. Make an appt. with your Dr. and get on your way... so you can have peace of mind of a healthy little one. =)
Go see your doc immediately and try to wean down under their care.