Xvid has better compression and maintains higher quality than Divx. I really like Xvid. As an example, with the same video quality settings, I can get an anime episode down to 22MB w/ Xvid, but only 50MB w/ Divx. (Example settings: 85% quality, 1-pass quality, 12fps, 2:1 high quality reduction). Subtitles are still clear and readable, and all in all it still is watchable at 1024x768 full screen.
Divx however has much better seeking. If you're skipping around a video quite a bit, especially long ones, Divx is much better.
Granted, this is only my experience with the two codecs. I use Nic's Xvid (as suggested by Alex). The capabilities of both, at least on my end, are reproduceable on a variety of platforms (linux, 98, 2000 and XP) and processor speeds, but I could be wrong globally.