Why is Beijing chosen as China's capital and not Xi’an, given that Xi’an has a more central location in China and has been a favourite city to be the capital of China throughout China's long history? Is Xi’an a rich city today?

为什么选择北京而不是西安作为中国的首都,因为西安位于中国的中心位置,而且在中国悠久的历史中一直是最受欢迎的中国首都城市?今天的西安是一个富裕的城市吗?