First, move your complete collection to a portable drive .. say F: (and let iTunes manage the collection).
Backup your My Music folder as well as your Document and Settings folder in XP. (generally found under C:\Documents and Settings\
Next install iTunes on your Win 7 box. Pretty straight forward.
Start iTunes and deselect all auto search et al. You have a clean iTunes installation. Close down iTunes. Wait for few minutes to ensure that it has exited completely.
Next Follow These...
1. Copy "C:\Documents and Settings\yourusername
2. Copy "C:\Documents and Settings\
3. Copy "My Music\iTunes" (from my documents backup in win xp) to "My Music\iTunes" in Win 7 Libraries.
In above steps, replace
Now start iTunes again.
All your music, playlists and settings are back. As if nothing happened.
Note that if you are in different systems, the path to removable drive should be same (such as F:) in both systems. Change the system drive letters, if need be to achieve this. Choose a path that is rarely used such as letters from M: / N: / O: etc.