It would help to state what year XJ. The window mechanisms aren't all the same.
This happened with my wife's 2000 last year. The "snake" in the riser mechanism bought the farm, and in the new style doors (starting I'm not certain when) is NOT available as a separate part. So I had to buy the complete unit, including motor, even though the old motor was fine. Cost me about $150 IIRC, and took maybe 20 minutes to install. (Yeah, that price was my discounted price for the part -- not the total cost of having it repaired at the dealership.)
I was more than a bit aggravated, because for the '88 I can buy just the "snake" as a separate part for about $20. Oh, well ...