China's Xinhua news agency, the mouthpiece of Beijing, quickly urged restraint over the "unwise" nuclear test by North Korea.