Believe he's asking about removing the fuel pump from the whole assembly rather than the assembly from the tank.
JAYSXJ, any reason you're asking about this on the ZJ forum for your 98 XJ rather than the Cherokee Technical forum?
If similar to a 96 ZJ fuel pump assembly there's locking tabs around the top/sides which hold the top of the assembly on. You pry them back with a small screwdriver around the outside while pulling up and eventually the top will come off exposing the fuel pump inside. Than you just remove it, put the new pump in, and put it back together. Below is a pic and you can see the locking tabs if you look close.
Personally I replaced the whole assembly w/a new Bosch. While maybe twice the cost it was a pain dropping the tank, assembly came with a new fuel pump, fuel sensor/float for your gauge, new fuel pressure regulator, and a new strainer in the bottom. Plus older assemblies become a little brittle w/age and heat. Up to you and good luck.
Note: not sure if the fuel pressure regulator is inside the assembly on your 98 XJ or not.
Yes , because I own more than one jeep and the other is a 97 ZJ. Trying to fix for my son. Just didn't want to break anything getting the fuel pump out of the assembly. Thanks. Sorry I put model and such in the question I had before and forgot it here.
If it doesn't have a motor or tits I'm not interested!
__I I __ I I__.o00o.
l__---l___l___l---- lllllllllll 
._( 0 ) )______( 0 ) )--o-)_)
OK, didn't know you were talking about a 97 ZJ. I replaced my fuel pump assembly a few months ago on my 96 4.0 and had the old OE one sitting outside. There was a TSB some 16 years ago on these 96 pumps getting too hot and failing.
I took the top of the pump assembly off a couple days ago because there was a question about where the fuel pressure regulator was. Thought maybe I'd break something in prying the tabs back but found the nylon/plastic type material was pretty darn strong and came apart w/no problems. So if you're careful can probably just replace the parts you want but I'd put a new strainer in it with the pump.
Do you already have the pump assembly out of the tank? When I dropped my tank I disconnected the fuel line at the filter. Then dropped 2'-3' of fuel line with the tank since you can't get to the top of the tank to get the line off of the assembly line/nipple.
Where I ran into real problems is the end of the quick disconnect fitting was only 1/4" away from the top of the assembly so there was no way to get my quick disconnect tool in there to release the inside fitting tabs. Ended up having to hacksaw the line/nipple off of the assembly to remove it w/a quick disconnect tool but was installing a whole new assembly anyway.
Real poor design in having the quick disconnect fitting so close to the top of the assembly. Hope you don't run into the same problem w/your 97 but if so you could probably just keep the line attached to the assembly in just replacing the pump. I read where the dealer wants $100+ for this short line w/quick disconnects from tank to filter which is outrageous. I did away w/the quick disconnect on my filter some years ago and just use fuel injector hose/clamps. But don't know if you could do the same thing with the one on the top of the tank or you'll need an elbow since line may get crimped with tank is so close to the body.
The Bosch assembly made an improvement where the line/nipple coming out of the top of the assembly was about 1/2" taller so you could get a quick disconnect tool in there w/no problems. It's also made of metal instead of plastic/nylon like the OE one. Good luck.
YW and glad you got the pump assembly apart. Never saw you post your 97 engine size but maybe it doesn't matter since the pump parts are likely the same. Just happened to think, isn't the 97 where the pressure regulator, and maybe filter, are on top of the assembly?
Regardless, in addition to a new pump, and possible strainer(s), you best replace the check valve in the assembly. That's one of the parts that failed on my 96 4.0 and it wouldn't hold pressure. You probably already know the specs since they should be the same as your 98. 49psi +/- 5psi and the pressure shouldn't drop below 24psi after 10 min of shutting down.
In addition to the check valve allowing bleed off on my 96 the engine would bog down when making left hand turns because the fuel pump was failing. Go figure on why only left turns... Good luck.