I've posted this (http://news.ycombinator.com/item?id=4562051) yesterday, and after receiving enormous number of views, I've decided to make some improvements to my script - I've added option to generate XML code (beside MySQL).
http://github.com/peric/GetCountries
World `countries` in MySQL and XML format | Heykuki News