Illustration: Dionne Gain Trump marked the new year with a juvenile tweet: "Happy New Year to all, including my many enemies and those who have fought me and lost so badly they just don't know what to do. Love!" Xi gave a televised New Year address to the nation, translated into 65 languages. Instead of a 27-word taunt, his1200-word speech was a positive appeal for united action. A Trump theme is America's failure; a Xi theme is China's success. Xi boasted, for instance, that China "maintained our economic growth ranking of first in the world". His anti-corruption campaign, he said, "unswervingly cracked down on both 'tigers' and 'flies'", the powerful and the less so, in a bid to "purify our political ecosystem".

He listed scientific achievements of 2016. China finished building the world's biggest radio telescope, half a kilometre across; launched the world's first quantum satellite, with the aim of pioneering unhackable communications; successfully orbited its "dark matter" detection satellite; tracked its manned space mission. Notably, in his promise of prosperity he included not only the Chinese people but a world audience: "The Chinese people have always believed that the world is a commonwealth," said Xi, speaking from a lectern. "We Chinese not only aspire for good living for ourselves, but also hope people in other parts of the world lead a decent life." One of Beijing's specific economic offerings to other nations is participation in its ambitious "One Belt, One Road" plan, redolent of the ancient Silk Road. This is to link Asia to Europe by land – the belt – but also by sea, a maritime "road". It's planned to involve multi-trillion dollar infrastructure investments spanning 60 nations. It's a Xi signature and he made sure to mention it.

He followed this performance by travelling to the Swiss town of Davos, where the high priests of globalisation gather every year to fret, fashionably, about the state of the world. It was the first time in the 45-year history of the World Economic Forum that a Chinese president had attended Davos. Trump was absent. It was "Hamlet without the prince," according to a commentator with Britain's Guardian newspaper. "The world is looking to China," said the founder and chairman of the World Economic Forum, Klaus Schwab, in introducing Xi to the stage last week. The Chinese leader did not disappoint. With Trump's America promising to impose drastic trade restrictions, Xi pledged to his international audience that "China will keep its doors wide open". Giving substance to his rhetoric, officials in Beijing simultaneously announced new measures to open China's mining, infrastructure, services and technology sectors to foreign investors.

With Trump announcing America's withdrawal from the market-opening TPP trade agreement, Xi declared that China would "vigorously foster" an "opening-up for common development". China would press ahead with two big international trade deals, both of which, incidentally, include Australia. Xi again addressed his signature plan, One Belt, One Road: "Chinese companies have made over $US50 billion of investment and launched a number of major projects in the countries along the routes," he told the Davos elite. As the US turns inwards, China is reaching out to the world. With Trump scorning the Paris climate treaty, Xi described it as a "hard won agreement" that "all signatories should stick to". The former Swedish prime minister Carl Bildt commented: "There is a vacuum when it comes to global economic leadership, and Xi Jinping is clearly aiming to fill it. With some success."

Trump drove home the contrast with his inaugural address: "From this moment on, it's going to be America First," the newly minted president said. "Protection will lead to great prosperity and strength," oblivious to the searing lesson of Smoot-Hawley, the US protectionist blunder that helped turn the 1930s downturn into the Great Depression. It fell to the leader of the Chinese Communist Party to make the case for open markets: "Pursuing protectionism," said Xi, "is like locking oneself in a dark room. While wind and rain may be kept outside, that dark room will also block light and air. No one will emerge as a winner in a trade war." The problem wasn't globalisation, said Xi, but how best to manage it to make sure that the benefits are shared fairly. In the competition for influence with the other governments of the world, the contrast between Trump and Xi is reminiscent of the Aesop's fable where the north wind and the sun compete to see who is stronger.

The test is to see which of them can take the cloak from a traveller walking in the countryside below. The howling north wind buffets him but the traveller only draws his cloak more tightly around his shoulders. In the fable, the beaming sun takes his turn, shining warmly until the traveller removes the cloak. Trump is an angry north wind of threats and bluster; Xi is the benign sun promising prosperity. Of course, China's PR job cannot be taken at face value. It remains a repressive dictatorship that continues to intimidate its neighbours. Its economy recently has been growing not in the rich loam of private entrepreneurship but in the poor soil of government stimulus. America's institutions are strong enough that even Trump will not be able to destroy the country altogether. But we are seeing a momentous contest as America retreats from the world and China embraces it. And governments everywhere weigh their options. Peter Hartcher is international editor.



