I had chronic cooling probs with my 4 litre.
The thing that fixed it in the end was having the radiator recored. I had tried back flushing it but it was to far gone.
XJs are marginal on cooling, so the system has to be in top condition to avoid overheating, on the plus side you'll be very unlucky to blow the head gasket or anything like that, those motors are tough. :D