....get the XT without kit lens and pick up a cheap prime lens. It will take much better photos than the kit lens.
Between the d40 and the XT, my personal option will be definitely XT. I like the way the canon cameras feel in my hand, all the controls are very easy to manipulate and accessible. But again that's me opinion, you need to try both units and make your decision based upon your experience. good luck!