Chinese state media on Saturday cheered the meeting between U.S. President Donald Trump and his Chinese counterpart Xi Jinping as one that showed the world that confrontation between the two powers was not inevitable.

The official China Daily newspaper said it was encouraging to see the two-day summit that ended on Friday "going as well as it could", after earlier "confusing signals" from Washington about how it was approaching the U.S.-China relationship.

Trump had campaigned with strident anti-China rhetoric and had angered Beijing before taking office by talking to the president of Taiwan, the self-ruled island Beijing claims as its own.

But the two sides avoided any diplomatic gaffes at Trump's Mar-a-Lago resort in Florida that would have tarnished the meeting in the eyes of the protocol-conscious Chinese.

China Daily said both parties appeared "equally enthusiastic about the constructive relationship they have promised to cultivate".

"This may sound surreal to those preoccupied with an 'inescapable' conflict scenario between what they see as rising and incumbent powers," the newspaper wrote in an editorial.

"But that Beijing and Washington have so far managed to do well in preventing conflicts shows confrontation is not inevitable."