|You should be using the recovery disks from Compaq.|
If you bought the computer new and never made those disks you may still be able to.
Read your manual to learn how.
If you use a retail WinXP CD you will need to use the key for that CD and you will need to install all the drivers for your hardware. The reason you got that error is because your computer probably has a SATA hard drive and WinXP doesn't have the necessary SATA drivers.
You would also lose all the other programs that originally came with the computer.
Make the disks or buy them from Compaq. Compaq is a division of HP (Hewlett Packard).