If your budget is limited, the '89 to '94 KDXs are an excellent value and would be a big improvement in performance over your XR. If you've got the money, get a newer one, but the older ones are still tons of fun.
If you are getting a used bike that is not well maintained, you might need to replace items such as swing arm bearings, wheel bearings and linkage bearings. This can get pricey. Eric Gorr's book has a lot of excellent tips for what to look for in a used bike - you can find the book at Barnes & Noble or order online.