China and Nepal hailed the "beginning of a new era" in relations Sunday as President Xi Jinping ended his visit with promises of a railway and tunnel connecting the two countries.