Hi Johan,
I think you need to decide what you want in the car you are looking for before pulling the trigger.
The 330d, I would say is more reliable and far less temperamental than the x35i, the fuel consumption is far better than the x35i, you have loads of torque and enough power to satisfy most people.
The 335i, while it is still reliable they are temperamental cars and problems can become costly, if your are looking to mod the car then you want a N54. The fuel consumption isn't as great as the 330d.
Also it will depend if you want a coupe or a sedan...
But whatever you choose, both are great cars.