I suspect you have more than one problem. What year is your car? The later models had a small pilot light in the headlight assembly. If your main lights are burnt out, you will only see the smal light.
As far as the fog lights, check the fuse and the relay. The relay is under the hood and the terminals do get dirty.
2011 XF 5.0
94 XJS 6.0 Coupe