there is a better way but its a little too long:
Case 1:
1) install Windows Vista x64 over XP x86 with UPGRADE method, i dont remember if you can upgrade 32 bit XP to 64 bit Vista but you can try.
2) Install Winodws 7 x64 over Vista x64 with UPGRADE method. If 32 xp to 64 bit vista worked than thats last step.
3) Manually restore few missing files from Windows.old and yet another folder with folder upgrade method was not able to hook up. About 90% of your software will be ok, but about 10% needs to be reinstalled or reconfigured for new pathes.
Case 2 (where you can not upgrade 32 bit xp to 64 vista):
1) install Windows Vista x86 over XP x86 with UPGRADE method.
2) Install Windows 7 x86 over Vista x86 with UPGRADE method.
3) Use 2 different windows backup features available in control panel and created full image backup of disk C (it will make a copy as VDD which you can mount as HDD in windows 7) and another one that allows to select user folders (im not sure how that named in english windows, i use russian one, it should be calles some Archivation, Windws 7 has annoying popup about setting up archivation of files, its exactly what you need), just store both on 2nd hdd or partition or even on drive of another pc\laptop if you have one shader in local network.
3.2) Run Regedit and export entire registry to REG file on another drive or partition.
4) Start installation of WIndows 7 x64 from WIndows 7 x32, choose clean install (dont worry you have backups) but dont format current partiona, just install on it, windows will move all files again in Windows.old and yet another folder in root of disk C.
5) Once you installed Windows 7 x64, open disk where you archived your x86 user files, you will see there a folder named like your PC was with icon of HDD and CD, once you click it you will see UI "do you want to restore files?" - click yes and backup feature will at least restore Documents, images, videos, most of appdata romaing \local settings and pretty much most of what was in C:\Users\Your_username\ .
6) Reinstall you programs, most of them will have settings ready to be use.
7) In case program set everything in registry - open that backup reg file in some program like Notepad++ - search hives with program or company name, copy all related portions, save as new reg file. Also in case your program was 32 and stil will be 32 bit, you will have to edit this file and replace all \program files\ to \program files (x86)\ and change registyr path by addin |Wow3264Node in between Sofware and COmpany or software name in path, fo example if there was something like HKEY_CURRENT_USER\Software\Rockstar Games\GTAIV and you know that even on 64 bit system software still uses 32 bit binary - change path in reg file to HKEY_CURRENT_USER\Software\Wow6432Node\Rockstar Games\GTAIV same goes for adding space (86) to Program files. But in case where reinstalled software is purely 64 bit and installed in Program files , you should keep path without Wow6432node and without (x86). Google for CFF explorer to analyze program EXE and be sure if its 32 or 64 before changin reg pathes.
8) In case program stored settings in its own folder in ini or cfg or whetever extenstion was or in case you had modded game files or crackes exes there (that official installers obviosly did not restore), you have to go to that windows.old folder and another (name is random so i cant tell for sure but you will understand when you see it) one, take missing cfg and ini files and any other modded files copy them and paste to folder of reinstalled software. If windows missed something and there is no files you looking for, you can always open ADMINSTATIOn in START, find partition managment and mount that VDD backup and get rest of files from it.
Such method should work fine for about 90% of software. Complicated a little, takes time to preper, but better than having totally empty system.
few notes:
1) In case you are gamer and care for stats and saves and some tweaks and settings - use Game Save Manager (google for it) to backup saves before you do installation. After you can restore everything and keep playing games without problems. Also in case of steam games - you will need to delet ACF files in Steam\SteamApp so steam will thing games not installed. then start installation and select same library\disk where gama is already installed, steam will find existing files and will only redownload missing or changed files, but it will take time to revalidate them this will save you from re-downloading them.
This method however has disadvantage if you hav unofficial patches and mods or tweaks installed in game folder, steam will override them with default game files. To prevent that i suggest to copy game installation folder before reinstallation, and after reinstallation you should just copy backed up folder with game and past it on original folder and override all files. this will restore all mods and tweaks you had there.
MOST IMPORTANT NOTE:
2) USE SAME USER NAME WITH SAME PASSWORD AND SAME PC NAME you have in XP now for every new OS installation to avoid settings of programs and other files gone in different user folder and to prevent security errors! Os if you pc is called Uber-PC and user name is MyName and password is 123456 in XP, it should be set 100% same when you install Vista and 7. Otherwise you will have to do a lot of manual folder movement and configuration file editing.
3) In case you need Vista 32 and 64 but ISO or 32 bit ISO of Win 7 (i suppose you only have Win 7 x64 now) you can use torrents. Its not technically a piracy since both oses gives 30 days of trial before you need to enter activation key, so you can download iso from anywhere and its would be legit to use them for free for 30 days until you not cracking windows activation.