Being a Parent can be confusing. I don't know from having a child but being the Child in a most complex situation.
My parents could not agree on how to raise me.. my father wanted me for a year,then she have a year etc. they could not agree which led to a parent ( I will not say which one) abducting me and taking me across state lines.
5 years later I was returned and it was not a easy re-assimulation. I learned I had a sister that was born while I was "away". I had a step parent that was not over joyed at my return. Things got progressively worse.
If you cannot work out these issues with your ex spouse.. then please before things get out of hand. Try mediation... that way each parent's "rights" are worked out. The main thing to remember is your child... who is a individual in her own right. Who should not have to be made to choose, decide who is right or wrong, nor should any parent put down the other to her. As the saying goes you may HATE eachother's guts, but you show only love to your child. It doesn't involve her, what ever was between you and your ex. Otherwise your child may feel like she is at fault for the divorce.
Believe me, I respected my father more b/c he did not put down my mother. Did not discuss the reasons for the break up or anything. Until I asked and pressed him to find out his side of the story. I was a adult when I asked him. There was a lot of regret, sadness that tinged all this. My mother on the other hand.. she just spewed hate and vile things.
Do not stop being there for your daughter. She will respect you for it. More so than your wife, if she continues to "trash" you to her.
An mostly all I can say is hang in there. Parenting is not a exact science you will make mistakes, admit them, say I am "sorry" and move on.
Xandria