I'd recommend the nikon d40 over the canon. the d40 will feell much better in your hand and the controls are much more easier to use. You really need to just go to the store and see how it feels in your hand and try doing some shots with it. don't fall for the megapixels of the xti. You won't be able to tell the difference between 10 and 6.
but if you don't care bout anything i just mentioned, just go for the canon and think about upgrading to a 30d later on.lol
Seriously...that doesn't sound biased at all...seriously
My problem with the D40 is that it doesn't have an AF motor and relies on lenses that have the AF motor, leaving you not about to use every lens in the Nikon lineup with AF. AF is important. Unless you're the flash and can focus as fast and with as much accuracy as a camera's AF system, or don't want to use those lenses, then the D40 might be a good camera.
They do make a 10mp version, the d40x. The XTI does have some other nice gimics though, including the sensor cleaner. It just vibrates the high pass filter that resides infront of the sensor, helping to keep down on the dust specs a little bit. Canon is also known for having extremely good high ISO performance in comparison to most brands. You might not know what ISO is, so this could be a moot point as well.
And saying MP's doesn't matter when you have no idea what the person's intentions are, is just foolish. If a person wants to shoot wildlife photography and make prints of 30"x40" or poster size, then MP's matter. I take it you haven't seen any images out of the FF sensor cameras that have more than 12 MP's? The clarity and detail in the images are
amazing. If the person just wants a DSLR to tool around with and wants to pick up photography as just a simple hobby, then it doesn't matter, but if the person actually wants to eventually take it to another level, then the first camera choice can mean a lot.
Heck, I use a 30d as my primary, but I'm not beyond picking up my XTI when I know it's a shot that I'm going to want enlarged, I take the tool that works best for me...the camera with the larger mega pixel count.