When did marshmallows appear in China?

China didn't invent it. There should have been marshmallows in the Qing Dynasty.

Wharton and Morrison registered a patent for cotton candy machine at 1899. They invented an electric machine, which melted white sugar by centrifugal force and rotated it through a small hole, and then produced cotton candy. The two inventors from Tennessee, USA, obtained patents.