Yes you can buy the upgrade. However, you cannot upgrade an XP install to windows 7.
The upgrade will require you to do a fresh install as would the full retail. Meaning in either case you will have to reinstall all your programs. But the upgrade would save you money over the full retail given your machine already has XP. If at a future date you wish to move the upgrade, you can remove it from that machine and install it on another machine with an eligible OS to upgrade.
The full retail is the same deal except you can move the whole package to a new machine. No need for that machine to have an eligible OS already installed.
So if in the future you plan on building your own system and using this OS on that or any other machine, then the full retail is the way to go. If this copy of windows 7 will never leave that system, then go upgrade.