Install XP on winbook xl running win98se?

I've got an old winbook xl running win98se with a disagreeable virus that won't let me download antivirus, closes ie with the error message "this program has performed an illegal operation and will be shut down," and takes me to porn sites.

Abesent any solution - is it possible to do a clean install of xp on this machine? If so, I have an older Dell xp os disk and an older xp os disk from Gateway. Will I need product codes and where do I find them?