Let x represent the oxidation number of Xe. Since fluorine (F) has an oxidation number of -1 in most compounds:
2(-1) + x = 0
Solving for x:
-2 + x = 0
x = +2
Therefore, the oxidation number of xenon in XeF2 is +2.