If you want to look at some really thorough reviews of the D40X, 400D (etc), take a look
www.dpreview.com. They call it a draw between the two models, but there a pros and cons of either choice, obviously.
My GF's gone from a 35mm Canon EOS 300v to a Nikon D70 (but I use them more than she does!!), and I do like the rather more solid-feeling build quality of the Nikon. But I guess most importantly, I've had great pictures from both so I've no brand preference.
Don't forget that the D40X and 400D don't have separate status LCDs - this might not bother you but I really like having it on the D70.
One other thing - it would appear that the stock lens on the 400D isn't fantastic, so you could consider getting a body and better lens kit. And against the D40X is that it doesn't have its own AF motor, so you need to get AF-S/AF-I lenses to autofocus.
I think the 400D has the price edge, if you compare the stock kits.
Sorry, not sure if any of that has helped. Decisions, decisions!