Hey,
I was in a situation like yours not too long ago. I bought the XS and while it's a great camera, if I knew then what I know now I wouldn't have bought it.
If money is your main factor (it was for me) I would get a used 40D.
I use the camera for low-light (bars, house at night time, etc.) and mostly for group photos. I also use it for action shots if we go to a trip or something.
I found that if taking several raw photos in a row (even if not immediately in succession) there were several times the camera said "busy". I joke and say "sorry guys, the camera is thinking" and it usually gets some laughs but the waiting does kill the moment. The 40D wouldn't have this issue.
Focusing could be faster, and more accurate. The 40D has more focus points all of which are cross-type, the XS has 7 focus points only which the center is cross-type.
Also, the feel. After holding the 40D the XS just felt...weaker.
I don't know, on paper there differences aren't THAT life changing. But it does have an effect on the overall real life usage.