well, the D40 has a slightly bigger sensor than the XT, it also has a nicer screen, better metering, better white balance presets, a nice picture control thingie. the nikon kit less is a bit wider, since the sensor has a 1.5X crop versus 1.6X for the canon, the lens is also a bit tougher, better made, the autofocus is plenty fast and minimum focussing distance. The handling on the canon is also a bit sluggish and the menu looks like cr@p. The only thing that I feel canon has a bit better, is that the AF will work on all canon lenses ever made(that ha AF capabilities), where as the nikons is only compatible with newer AF-S lenses, that means some of the jewels from nikon, such as some prime lenses will not autofocus.
so me thinks you should go for the D40, but between me and you, I would wait a bit since the D40 is the oldest camera in nikon's book so far, except the F6. Try to get a D60 instead.
or get my hasselblad