Nobody has mentioned the Headlamp Delay Module, on some model XJs it can cause your lights to come on after the car has been shut off and stay on until the battery dies. I didnt have this problem in my 99 Classic, but a friend did in his 00 Classic. We corrected it by unplugging the delay module located behind knee bolster on the left side. There may be other solutions to the problem, but we did this and it worked.
Looks like this: