NOt accelerating on 2003 Hyundai XG350

I am having problem with my car stalling and barely accelerating just had a transmission put in and it do not want to go over 35 mph could someone please help me. The codes it is giving says it is the TPS(Throttle Position Sensor)don't know if that is it and do not want to spend alot of money on something I do not know if it will help.

Asked by for the 2003 Hyundai XG350
I own a 2004 XG350 the same happend to me I disconnect the battery and connected again then i start the car and the problem went away you should try this before buying anything
1 more answer
Just wondered if you found anything that worked. I am having the same issue and the dealer recommends a throttle sensor and cam sensor for a ridiculous amount of money. Please let me know what worked