Roger,
1st check the voltage going into the Battery Charging Rectifier from the alternator. You should get between 12 Volts DC to 16 Volt DC with the engine running.
If you get these results next check the battery. You should get max 13v dc going to the battery. If your battery is not charging on this unit or gets under 12x dc, you need to replace the battery charging rectifier.
http://www.generatorguru.com/battery-charging-rectifier-99302775/
If you need other parts you can find them on this page.
http://www.generatorguru.com/xp8000e/
Hope this is of assistance to you!
This is an older generator. If you have the owners manual, there should be wiring schematics that give the wiring legends to all of the connections. I can't find a downloadable .pdf manual for your generator. If you don't have the manual, you'll likely have to take your generator to a service center for repair & testing.