Hi, Paulina,
Thank you very much for your attention with your questions.
Well noted the questions you concerned.You are right it takes only 2 hours from Beijing to Xian by flight. Then you will need to be at airport around 1-1.5 hours prior to the flight departure time, or earlier if the the security check become stricter. Then you might need around 0.5-1 hour to wait for the luggage. The total time will be around 4-4.5 hours except the time on the way to and from airport and based on no delay. In China, most flights are delayed, unless your flight is the first or second in the morning.
Nowadays, there are many high speed train between Beijing and Xian. The duration is around 5-5.5 hours. The fastest train from Beijing to Xian is G87, departing at 14:00 and arrive Xian at 18:30. It lasts for around 4.5 hours. High speed train seldom delay. Therefore, from time, it is almost the same, but the time on the train is longer than that on the flight.
Regarding to the view along railway, there might not be anything more extraordinary. You know, Beijing and Xian both are in North China. The view outside window is almost the same. Besides, since the train is fast, you might not enough time to enjoy the outside view. Therefore, I think this is not an important factor for traveler. If you visit several cities in China and have many legs of flights between cities, why not try one leg of train as a different experience.
Besides, the high speed train fare is much lower than the airfare. Nowadays, the airfare from Beijing and Xian is marked up a lot. If possible, I do suggest you choose high speed train. But it depends on your own decision.
More information about the high speed train:
/china-high-speed-train/china-high-speed-train-cars-and-seats.htm
Best regards
Top China Travel