The D40(x) is exceptional at High ISOs, much better than the xti.
Much better? I am a Canon shooter and comparing it to ISO 1600 images from my frenemy's
🙂 D40x, it's pretty much a draw. Comparing it to D40 is not entirely fair since D40 has 6 MP image sensor (vs. 10 MP on D40x and XTi).
I will tell you this much, he much prefers D40x's grip and I much prefer XTi's less rubbery controls (donno what but D40's knobs feel cheap to me). But ergonomics is highly subjective so one needs to audition them both in person.
There are number of reasons to choose XTi: better lens selection (especially in terms of focusing and image stabilizer), minimalist no nonsense UI with quicker access to important settings out-of-the-box (D40/D40x requires customizing to change ISO speed with 1-click for instance), 9-point auto focus, self image sensor cleaner, RAW+high JPEG option (IMO, D40x's RAW+BASIC is useless), and generally faster operation to name a few.
Of course, D40x has sufficient number of lenses to choose from (although they tend to be more expensive), better kit lens options, better grip, better metering, etc.
Frankly, I think D40 is a better choice than D40x. Do you really need 10 MP? The price difference may buy you a better lens and/or other accessories and unless you are heavily into cropping or very large prints, all you will get are larger file sizes.