My modified '02 KDX 220 cost me almost as much as my '04 KTM 300 EXC - $5,300 not including tax. Both are great bikes. The KDX does not vibrate as bad as the KTM and it turns sharper. It is easier to ride in the very tight areas. The KTM will do fine in the tight stuff also (with a 52T rear sprocket) but your hands tend to go knumb from the vibration.
What I love about the KTM: Flat seat allows you to move weight forward without smashing your xxts, awesome suspension and brakes, well balanced and easy to jump, more stable at fast speeds, more torque and less shifting and less wheel spin than the KDX, very mellow hit, cost the same as a highly modified KDX but with better resale. Imagine a KDX 300 in a KX frame with a great woods-friendly suspension. That's what the KTM 300 EXC is.
What I like about the KDX: turns great, soft seat, great gas mileage, low vibration, snappy throttle response (with RB Designs carb). I don't race, and I don't ride extremely hard all the time, so I would be happy on either bike. However, if I had to choose just one, it would be the KTM because it just handles better when pushed harder, therefore I feel more in control. Fortunately I get to have both of them, at least until someone offers me a decent price on the KDX.