Step 1: Understanding the Concept
The oxidation numbers in a neutral molecule add to zero. Fluorine is always \(-1\) in compounds, and oxygen is \(-2\) here.
Step 2: Set up the equation
Let the oxidation state of Xe be \(x\). The molecule \(\text{XeOF}_4\) has one oxygen and four fluorine atoms.
\[ x+(-2)+4(-1)=0 \]
Step 3: Solve
\[ x-2-4=0\Rightarrow x=+6 \]
Step 4: Check the options
A value of +4 belongs to \(\text{XeF}_4\), which has no oxygen. The negative values \(-4\) and \(-6\) do not work because the sum of the oxidation numbers would then be far from zero. So Xe is in the +6 state, option (D).
Final Answer:
Xe is in the +6 oxidation state in \(\text{XeOF}_4\), option (D).
\[ \boxed{+6} \]