First of all be there for her, but second.. stay out of it.. Do not get dragged into 5th grade girl drama..
Listen to what your daughter tells you. Use one for each incident..
Ask her things like ~ "Why do you think she said that?"
"What do you think about how they acted?"
"What would you have done in this situation?"
"What do you think she should have done in this situation?"
Give her basic suggestions. Pick one at a time...
"Just stay away from her."
"Do not get in the middle of their problems."
"A good friend would not act like that."
"Be nice to everyone."
"Is that how you act?"
I know it is hard, but this is what girls do. I hate it too, we all know it is a waste of their time, but they need to learn to fight their own battles, or even better, to stay out of them. I know grown women that still act like this, but I know even more that learned a long time ago, it is all a big waste of energy and as long as we treat others the way we want to be treated, we will be fine.
Teach your daughter to be proud of who SHE is. Remind her everybody is their own person and this is a GOOD thing. Also remind her people that stand by and let others pick, shun or bully others, are just as guilty as the person causing all of this drama."