In order to get from Shanghai to Xi'an, I booked a "soft sleeper" bed in an overnight train. This costs around 550 RMB (~115 NZD), and I bought the ticket at the local Jing'an ticketing office. The lady at the counter spoke English, but to spot the store you probably need to know the characters for train. I followed instructions from an online forum, and still spent a bit of time hunting for it. If you look at the blue strip at the top and squint a bit to make up for the ipod camera photo quality, you can see 火车票 (AKA train ticket) are the leftmost characters.
The soft sleeper cabin is pretty comfortable looking. You get a pillow and a duvet.
There's a television, in theory.
And the controls on the wall beside the bed, within easy reach. Of course, no train I have been on shows anything on TV other than a blue screen.
There's a convenient power socket if you feel like using your laptop, or run out of power on some device. Not sure the air conditioning dial made much difference.
And overhead luggage space.
My travelling companion was an engineer who worked making axles for rotors for boats and generally most any machine, or something similar. He travels around China quite a bit for meetings related to this, taught himself reasonable English from a CD, and lived in the states for two years.
On my Xi'an to Beijing leg, I bought the ticket at the Xi'an train station. This cost around 440 RMB. One thing to note, is that apparently some train stations have special lounges where those who paid out for the soft option can wait away from the teeming masses. Here's the one at the Xi'an train station.
The soft sleeper lounge also has a special entrance, where you don't need to get into the queue where everyone pushes forward to get their ticket checked and access to the train.
Seeing a foreigner sit down, the girl above came over and asked to look at my ticket. She obviously planned to let me know when my train was departing. When a group of other foreigners came in, she sat them down beside her and told them she'd let them know when they were to go. I was expecting the private entrance to give earlier access to the train than the teeming masses got, but going through immediately when my train was announced, the masses were already present and teeming their way to the train.
For this leg to Beijing, the cabin had four men including myself, and one child who shared a bunk with his history teacher father. The history teacher was the only one who could speak English, and had also taught himself from CDs. At some stage, the ticket collectors came through and charged him for his trip which he didn't seem to have paid for yet. He paid ~178 RMB, which I should have asked him about, it being less than half what I paid.
On the way back to Shanghai, the ticket was around 475 RMB for the cheaper train (16:58 PM departure, 06:30 arrival). There were no televisions, and a lady came around and accounted for each passenger by swapping their ticket for a plastic card. When it was your stop, she would come around sometime before, wake you, trading your ticket back for the card. It's quite a good system from the perspective of a foreigner, as it ensures you won't miss your stop. Especially if you are disembarking somewhere along the way.
I read some foreigners complaining about not realising they'd be on a train for a day and a half and not having any food, but that's not a real problem, at least not on any train I took. A food card came around every half hour, both in the morning and evening. There was also a food carriage where you could get freshly cooked meals, beers, cokes, and sprites.
This is so much better than flying, or taking a high-speed train during the day. You get the bulk of the day before and after to yourself, and a good nights sleep.