What year?
I know for certain that RENIX (1987-1990) XJ's with 4.0 have a fuel filter where
you can get at it - it's on the left frame rail, forward of the gas tank, and about the size of a soda can.
I believe that OBD-I (1991-1995) XJ's have a similar filter in a similar place.
OBD-II (1996-up) XJ's have an in-tank filter that is not meant to be serviced, and functions as a pick-up for the pump. I'm not entirely too keen on a "lifetime" filter, but I've not owned one, so I can't be sure of a procedure for replacing the thing.
Posting your year and other basic info is a good habit to get into - as you can see, there are often several ways to answer a question. Something like this:
88XJ/4.0/BA-10/NP231/D30/D35 (3.07)
Is often useful - here's how you read it:
1988 XJ, 4.0L I6, with BA-10/5 five-speed manual transmission, New Process 231 transfer case, Dana 30 front axle, Dana 35 rear, with 3.07:1 axle gears.
Take that and modify it to apply to your vehicle. With the 4.0, if you've got an automatic you've got the Aisin-Warner AW4 (AW4 in place of BA-10,) all front axles from the factory were Dana 30, and the rear was either Dana 35 or Chrysler 8.25, or (rarely!) Dana 44. Dana axles are usually listed as "D" and the model number (D30, D35, D44, D60, or D80 - the latter are usually for swaps and upgrades, and you should tell us what the donor vehicle was, if you know,) and the ChryCo can be listed as "8.25", "M8.25", or "C8.25"
If you have a rear axle with C-clips (which were found, I believe, in later D35 and some C8.25,) you can append a "C" to the rear axle number - for instance, "D35C." Note that if you find a "D35C" on the axle housing is does NOT mean that you have C-clips - it means that the axle was shipped to ChryCo "unstuffed," and you'll have to pull the cover and look to see what you've got.
If you've got some sort of LSD, you'll want to note that in drivetrain comments as well - "D35 Trac-Lock" or "D44 Detroit" is sufficient.
I know it seems picky, but that one little line will honestly make it far easier for us to not answer your question with another question - like this started out...
5-90