The Chinese president drew loud applause when he urged support for the "multilateral trading regime" and progress toward a free-trade zone in the Asia-Pacific.
"We should continue to foster an open economy that benefits all. Openness brings progress while self-seclusion leaves one behind. We, the Asia-Pacific economies, know this only too well from our own development experience," Xi said.
The leaders were speaking on the sidelines of an annual summit of the 21-member Asia-Pacific Economic Cooperation forum.
Trump told the same group that "We are not going to let the United States be taken advantage of anymore." He reiterated his preference for country-to-country trade deals, saying "I am always going to put America first."
Trump said he would not enter into large trade agreements, alluding to the U.S. involvement in the North American Free Trade Agreement and a Pacific Rim trade pact, the Trans-Pacific Partnership, that he pulled out of earlier this year.
China is not involved in that deal, called the TPP, but it belongs to other trade initiatives.
"We should support the multilateral trading regime and practice open regionalism to allow developing members to benefit more from international trade and investment," the Chinese president said.
China's own recent ascent as the world's second-largest economy came only after it launched reforms that opened its economy to more trade and foreign investment after decades of isolation following its 1949 communist revolution.
Prospects for a basic agreement on a revised TPP deal appeared in doubt Friday, as a meeting of the leaders of 11 countries still involved in the pact was delayed. There was no word on whether they had given up reaching agreement in Danang or were still working toward an agreement on how to move forward without U.S. involvement.
Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.