That's strange, why did u install XP in D drive instead of C drive? Commonly OS saves boot manager files in C drive (if it finds C drive while installing)... and if you format C drive ,OS won't Boot.
Take imp backup files from my documents and desktop or any other files which is located in c and D drive.. Then try this (I am not liable in anyway if things go wrong. usually it won't be a problem just in case)....
Run windows 7 DVD from windows XP... Go through the wizard and don't update anything from internet if it is asking to get latest updates,just press next until you see Upgrade or Clean install. here Select clean install and select C drive there and don't format the "C" drive ,just press next..Make sure you have 15GB space to windows 7 install... It will restart and continue with windows 7 installation... AFter installation , during Boot,, it will shows option to select Windows 7 or Earlier windows ,select earlier windows for windows XP if not select windows 7....