I took Xanax when I was originally diagnosed with anxiety disorder and frequently had panic attacks.
The problem was, my pediatrician (I was 16) prescribed it for daily use. Do not do this! It is addictive and you will need more and more. Take it like your doctor said "as needed".
I haven't used it since, and can't remember too well how it worked. I eventually got a psychiatrist (the MD type... or is it psychologist?) who put me on Celexa, which I've happily and comfortably been on up until now. I do still have some Xanax, and I take it whenever I'm having a bad anxiety night and can't sleep.