The new XE is touted as the 3-series killer. I test drove the XE 3.0 AWD back to back with a 340i. The XE is a great looking car, IMO, but the handling, interior fit & finish, and engine note leave something to be desired. It's very subjective, but I'd rather have the 340i.
Supposedly the XE RWD handles better, but the only way to find out would be to order one from scratch as the local dealers around me don't carry any.