my 97 XJ is doing this once in a while too. Every couple months or so. I believe the computer regulates the alternator. Stupid Chrysler!
Correct the PCM is used as the voltage regulator.
First step is to test the alternator itself. The parts place should be able to confirm if it's PCM regulated or not. I am pretty sure the 2001 XJ goes through the PCM as well.
One thing which may slip through the cracks is check the actual battery itself. A bad cell can cause surface charging and create the high voltage condition. Typically when a battery is damaged like this you won't be able to pull enough power from it to start the engine in the first place but I figured I'd mention it anyway. That being said if you apply too high of a voltage to your battery you're going to damage it in the same way, and possibly blow up your battery which will NOT end well. If you can hear what sounds like water boiling, leave the hood latched and closed, turn off your engine immediately and wait until the sound subsides.
There are ways to wire in external voltage regulators instead of replacing the whole PCM, not sure if the CEL will clear or not by doing this.