“It has been a typical tactic of the U.S. to send a strong political message by attacking other countries using advanced warplanes and cruise missiles,” the article said.

The state-run media offered sanitized accounts of the Mar-a-Lago talks, emphasizing the sweeping green lawns on which the leaders walked and the ornate room where the official discussions took place. Those articles omitted the surprise of the Syria attack, in keeping with the goal of presenting an uplifting account of the two leaders meeting as peers.

Mr. Tillerson told reporters that when Mr. Trump notified Mr. Xi about the Syria strike toward the end of dinner, Mr. Xi expressed understanding, because it was punishment for a chemical attack that had killed children.

The Chinese president very rarely talks to the Chinese or foreign news media, making it almost impossible to determine his opinion about the attack or how he expressed it to Mr. Trump.

But Chinese analysts, whose advice is sometimes sought by the government on foreign policy questions, were scornful of the strike, which they viewed as a powerful country attacking a nation unable to fight back. And they rejected what they viewed as an unspoken American message equating Syria, which has no nuclear arsenal, with North Korea, which has carried out five nuclear arms tests and hopes to mount a nuclear warhead on an intercontinental missile.

“I don’t deny that the United States is capable of such an attack against North Korea, but you need to see that North Korea is capable of striking back,” said Lu Chao, director of the Border Studies Institute at the Liaoning Academy of Social Sciences. “That would create chaos.”

If Syria had nuclear weapons, the United States would not dare attack it, said Shen Dingli, a professor of international relations at Fudan University in Shanghai. “Chemical weapons and nuclear weapons are totally different,” Mr. Shen said. “A chemical bomb kills dozens of people, and the atomic bomb at Hiroshima killed hundreds of thousands.”