This is a question that comes up frequently in divorce cases. Without reviewing your decree it is impossible to completely answer your question. Regardless of IRS rules, you could be in contempt of court if you claim your daughter as dependent and the divorce judgment says that you cannot. You need to consult an experienced attorney who can review your judgment and help you think through your options, which may include filing to modify/clarify the judgment.
I would also suggest that you seek the advice of a competent and experienced CPA.
Sign up to receive a 5-part series of useful information and advice about child custody law.