That will depend on how much of the old PC going into the new.
Xp activation uses what MS call a hardware hash. basically they work some sort of 'number' out, the first time it is activated, and this number is arrived at from the parts in the PC, and stored along with the product key.
As long as the 're-activation' number is 'close enough' to the old number it works.
click here for m/softs own description of how they work it out.