That depends... What version of Windows 7 did you buy? If it was the upgrade version, then no, because you're still technically using that XP license. If you bought the full retail version of 7, then you should be able to resell that XP disc.
Upgrade versions of Windows don't technically have a license, they just transfer the license from your old copy of Windows to the new one. So if you sold your copy of XP, you'd be selling your Windows license, and then lose your legal right to use Windows 7.
There is also the matter of XP being just a little shy of 10 years old, and already on life support. I know there are plenty of people out there who think it's the greatest bit of software Microsoft has put out ever... At least that is the opinion they adopted a year or two after it was released and the hardware had a chance to catch up with the increased demands of the OS, but the reality of the situation is that it's an aging and decrepit piece of junk that is riddled with numerous security issues which will never be fixed. Especially if you're trying to use it on anything even resembling modern hardware. If you've got an old P4 system that's one thing, but any kind of dual-core or better CPU, and the XP process scheduler is woefully ill-equipped, just for starters. So I certainly understand the desire to want to find something a good new home, and it's commendable, but when it comes to a decade old bit of software, it's probably better to mothball it.
Hi everyone. I have a perfectly fine Windows XP 32bit retail cd gathering dust, and I'd like to sell it and find a new home for it. This CD was installed a few years back, and I have no idea if it's still in activation. I had switched to Windows 7 about two years ago, by clean installing W7 over this copy I'd like to sell. Not sure if the license key has been deactivated, or if its even possible.
Can I legally sell this CD on ebay? I have found quite a few used retail cd copies being sold on ebay. I paid about $200 at a CompUSA a while back, it may be worth $30 or more on the secondary market, and would love to get something for it versus using it as a drink coaster!

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic