The taxis in Xi'an are few and far between–I tried a few times and never managed to hail one. Fortunately there are two other great ways to get around the city.
The first is by tuk-tuk. The second is by bus.
The buses are really convenient in Xi'an. You can plot your course on Google maps or Baidu, and it will tell you which bus to take. All the buses are either 1 or 2 yuan, and it says the fare clearly on the money box when you get on. Just toss the money in and you're good to go. The buses stop at all stations, so simply wait in the back and get off. There are a couple good routes that take you around the old city and down to the pagoda, or out to the Terracotta Warriors.
I had a weird fear about taking the buses in China, I guess I was worried that it would be difficult and everyone would stare at me. There's something universal to riding a bus in any city in the world–bus people just don't care about anything. Sure, an old lady might stare, but for the most part you could probably wear a full clown costume and no one would pay attention.