What year XJ are we talking about? One with a metal tank, or a 97+ with a plastic tank?
You cant, as far as I know, replace the pump on a later one without dropping the tank. You can with the steel tanks, though it's a bit of a hassle. If you need to check for leaks anyway, I'd drop the tank. The tank can rust at the top from accumulated mud and salty crud, and then it will leak intermittently depending on how full it is, making tracing difficult. The vent lines push into rubber grommets on top of the tank. It is possible to check these with the tank in. You should also check for leaks in the fill tube and the big vent line that accompanies it.
If you drop the tank on an older XJ, be prepared for the almost certain shearing off of the hanger bolts. You can either buy new ones or fab your own from 3/8 inch threaded rod.
I also agree that you should check very carefully for other leaks, such as injectors. A leaky injector or fuel line connection can't really be checked without the engine running, because the gas evaporates so fast. But these things are an engine fire waiting to happen, so you really must be sure it's not that. Older 4.0 injectors often leak around the electrical connection.