How works {XOR} constraint in UML?

After many years I have to fix this answer (though I got many upvotes for it).

The {XOR} means that class A must have either an association to B or to C but not to both or none. That means in one case you have A * - 0..1 B and in the other case it's A 0..1 - 1 C. Both are legal constructs per se. Only here it is that A will play two exclusive roles.

This is a purely academic construct, so what it means in practice is completely open. It would be more meaningful (and helpful) if such examples from tutorials/classes would have some real world connection.


Old (wrong) answer

This is simply wrong (or a puzzle). You need exactly one C to be associated with A. But then, due to the XOR you may not associate B. Which means: the B relation is always 0 and you could as well leave it away.

Maybe (!) someone has put the multiplicity on the wrong side. If you swap them, it would make sense. If you use real names rather than A, B, C you could guess from the context.