If you format a hard drive all data is lost.
Therefore XP will go too.
You did not really mean that did you?
Is it the case that you may have C drive with operating then a partition or two?
Speel out exactly the layout of the drive before you do anything at all.
If you format the whole drive do you have the Full operating system disk?