Is there a way to get all the registered domain names for .CN or another country code (CC) top-level domain (TLD)?
Is there a central registry for such data? If not, how do I go about collecting them?
You will need permission from the owner of the root zone for the Top-Level Domain (TLD) to acquire a copy of the root zone.
The IANA Root Zone Database lists owners for different TLD's if you'd like to follow up (some may require that you have a verifiable academic or business interest in the information).
As an example, Verisign maintains an FAQ for those interested in downloading the .COM, .NET, and .NAME zone files (with daily updates).