Beijing and the Great Wall of China are two places all first-time visitors should put on their itinerary. To avoid tourist scams (and in Beijing there are many) read about it in your travel guidebook before you go to Beijing.
The Terracotta Army and the walled city are fantastic, inside the walls are old markets which are fun, but two days max is enough for Xi'an. Outside the walls are dreary houses and factories. Other downers are the taxi drivers who refuse to use meters, just get out of the cab, the beggars which to a Westerner are very aggressive, and the pollution is horrific, took two weeks to clear!! And the use of lights after dark on vehicles/cycles is a rarity so beware when walking, but otherwise it's very safe.
Xi'an is ok and has great Chinese ambiance within the city walls, but I would not stay here more than two or three days. If you don't care about seeing the Terracotta Army and the Great Mosque, then don't bother to come here. The air quality is very bad here and there's not much to do here other than those two things.
Shanghai is like any big city and it feels too Western. The old city and Yuyuan Gardens is touristy but beautiful and the area across the water from the Bund is beautiful. There is not much to do here, so after three days I was ready to move on.
The old town is a must place to see. Go to Shangri-La.
I was recently down in Xi'an for a week and had a great time.
Despite some negative comments given, Xi'an is a "real" Chinese city. The tourist sights are well known but it's a great city to get out and explore. Especially if you like inexpensive street food.
Shanghai is a very beautiful city -- I just love it. Take a river boat and go to Shanghai Tower.
I live in Chengdu, so if you're looking for a cool party or exhibition check out the noncommercial platypusmusic.cn website.
Hostelz.com is the only hostel guide with complete information and reviews on all youth hostels and backpackers worldwide.