While both those leaders are key USA allies, Trump will be facing a much more formidable task in China, where he will be hoping to get support from Xi for reigning in North Korea's nuclear and missile programs, as well as trade issues.
When asked whether China considers Trump's use of Twitter to be in breach of Chinese law, Foreign Ministry spokeswoman Hua Chunying said there were many means of communication with "the outside world".
Mr Trump wants China to do more to rein in North Korea's nuclear and missile programmes, which not only threaten the security of Asia but are also beginning to possibly threaten the US. After the North's accelerating nuclear tests and intercontinental ballistic missile launches, China approved tougher United Nations sanctions. Trump arrived in China on the heels of Xi consolidating his power at China's Party Congress last month, whereas Trump is facing his lowest approval numbers yet back home.
Following a ceremonial welcome on, complete with flag-waving children and marching bands, Trump's official welcome at the Great Hall of the People onwill be broadcast live on state television.
So it is fitting that his first stop on his first state visit to Beijing was the sprawling imperial palace of the Ming and Qing emperors, the Forbidden City.
Trump arrived in Beijing on Wednesday for a two-day visit and was greeted by a lavish welcome ceremony complete with an honor guard, a marching band and dozens of jumping children waving USA and Chinese flags.
"THANK YOU for the attractive welcome China! @FLOTUS Melania and I will never forget it!" wrote Trump, who also posted an AFP photo of his visit.
Trump laughed at the antics of acrobats, then was serenaded by Chinese opera singers in elaborate headdresses and heavy make-up. "We need to strengthen cooperation, pursue stable and balanced economic and trade relations", Xi said.
But I don't blame China.More news: OnePlus 5T will be launched on November 16 in NY
That "balance" is something that Trump has been vocal about and although the president was measured in his language during the joint statement, he was less reserved at the signing ceremony, saying the U.S. "Today, I discussed with President Xi the chronic imbalance in our relationship as it pertains to trade and the concrete steps it will take to solve the problem of massive trade distortion".
Trump's visit to China is part of his 12-day Asia trip that has taken him to Japan and South Korea early this week.
Mr Trump has threatened to unleash "fire and fury" on North Korea and has regularly taken to Twitter to issue threats against Pyongyang. However, deep divisions persist over trade and North Korea. Do not underestimate us.
Looking forward to a full day of meetings with President Xi and our delegations tomorrow.
"We are devoted to reaching a resolution to the Korean peninsula issue through dialogue and consultations", Xi said.
"Without them really participating lock, stock and barrel in this it's not going to work".
He also urged China to sever ties with Pyongyang and reiterated calls for Beijing to ramp up pressure.
China's drug control agency last week disputed Trump's claim that most of the synthetic drug fentanyl at the heart of the US opioid crisis was produced in China.
China has repeatedly pushed back at suggestions it should be doing more to rein in North Korea, which does about 90 percent of its trade with China, saying it is fully enforcing United Nations sanctions and that everyone has a responsibility to lower tensions and get talks back on track.