It sounds like you are trying to boot off of the WinXP CD and perform a clean install (including the step to reformat the hdd)? Provide more detail if this is not the case.
Is a clean install your goal, or is this just the path you are taking to reformat the hdd (which is probably not the best way to go about it)?
I think the error you mention sometimes occurs when the boot volume does not have the files necessary to boot the OS. For example if you started to delete your system but didn't do so completely.
1. Make sure your CD or DVD drive is set before the HDD in the boot priority.
If the HDD is set higher in boot priority it will try (and in this case fail) to boot off the HDD and never get to the CD/DVD drive that has your bootable WinXP disk.
Reboot. During POST hit whichever key will bring you to the BIOS setup. Look through the BIOS for the boot priority and make sure CD Drive is first and HDD is later. On my system I have it set to fist boot from a floopy drive, second the CD drive, and third the HDD.
Another way to go is if you have multiple HDD in your system. Again in your BIOS you can specify which disk is the BOOT Volume. You can boot off one HDD and from there reformat the other HDD simply by opening up "My Computer" and then right clicking the non-boot HDD and selecting "Format".
Hope this helps.