Chinese President Xi Jinping and German Chancellor Friedrich Merz have confirmed that their countries will strengthen economic and other cooperation.