Depends on what you are going to be doing. Both bikes are excellent. XR200 bit more of a beginners bike. Four stroke. Indestructible, less power, probably less capable suspension, depending on the year of the XR and KDX.
KDX is a two stroke, meaning you'll be mixing oil with gas, but much more powerful than XR200.
Both are excellent bikes. Look at them, test ride them.
A big consideration will be how they were taken care of. Always ask to see the air filter. If the filter is missing (you'd be suprised how often owners simply remove and don't replace them) or in horrible shape, pass on the bike. Ask about maintenance routine. You want a previous owner that actually changed the transmission oil (KDX) or motor/transmission oil (XR) every few rides. If they don't even pretend to have done this, pass.
And, while looks can be overstated, if the bike is totally clapped out, it is often a reflection of how the owner took care of the engine, chain etc.
One thing I can say about the XR is that if you buy it, learn to ride without destroying it and want to move up, you can usually easily sell it for what you paid for it. Good luck.