First try with your parts and if it won’t work replace them one by one. Steps are:
Make sure that only must have hardware connected. (Disconnect all scanners, printers, webcam etc..) the only hardware connected will be ( CPU,MB, RAM, VGA card, HD, Optical Drive, Mouse, Keyboard)
Than enter Bios and make sure that Optical Drive is the first boot device.
Insert the Windows XP CD-ROM and reboot the computer
If you see a message about hitting any key to boot the CD, do so now.
MS-DOS portion of Setup begins
In the first step, you will be asked to press F6 if you need to install any third-party or RAID drivers.
Welcome to Setup
Press ENTER to continue Setup, and it will examine your hard drives and removable disks.
Read the license agreement
Hit F8 to continue.
Choose an installation partition
this crucial step lets you choose where to install XP. On a clean install, you will typically install to the C: drive, Setup will show you all of your available disks and let you create and delete partitions as needed. Delete the partition you wanted to install XP on, if it possible to delete all the partitions on the drive, than make your new partition, Hit enter to install, you will be asked to format the partition, make a full format, ntfs recommended).
In case of failure, start replacing parts…in some rare cases bios update helped.
Ps..data cables are hardware as well…