There are two different OEM versions of XP. One is tied to the hardware, and the other is not. Both require the manufacturer to put a sticker on the box, so what vhg says is not necessarily true.
If you have the former, you will need to buy a new copy of XP (not just for legal reasons, but because tied versions will simply refuse to work with the wrong hardware)
If you have the latter, what you suggest is possible, but if your new hardware differs substantially from the old, you may experience major problems, as all the hardware specific drivers will already have been registered. You may have to start in safe mode, remove most of the drivers, load any new drivers etc.
Personally, I would recommend backing up your data, performing a clean install, and then re-installing any programs you have, and restoring the data.
You will, of course need to re-activate you XP, but this shouldn't be a problem.