Free XML File resource containing countries?

mr_burns

Usenet Archive
Joined
Jan 8, 2003
Messages
29
Reaction score
0
Hi there,

I there anywhere on the internet where I can obtain free XML files? What I am looking for is an XML file containing all the countries of the world. I could creat one myself but if there are files available it would save me some time. For example:

<xml>
<countries>
<country id="1">Afghanistan</country>
<country id="2">Albania</country>
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
mr_burns wrote:

I there anywhere on the internet where I can obtain free XML files? What I am looking for is an XML file containing all the countries of the world. I could creat one myself but if there are files available it would save me some time. For example:

<xml>
<countries>
<country id="1">Afghanistan</country>
<country id="2">Albania</country>
.
.
.
<country id="150">Zimbabwe</country>
</countries>

There are lists like this here:
http://www.nw.com/zone/iso-country-codes
it should not be too difficult to read and parse that and make it into XML.
 

Andy Dingley

Usenet Archive
Joined
Feb 23, 2000
Messages
3,303
Reaction score
0
I there anywhere on the internet where I can obtain free XML files?

Find a free text file (of which there are rather more) and convert the format. You might find it in XML, but the conversion is easy enough.

I suggest searching for "ISO 3166" for lists of recognised country codes, or "ISO 639" for languages
 

Jukka K. Korpela

Usenet Archive
Joined
Oct 17, 2001
Messages
3,878
Reaction score
0
What I am looking for is an XML file containing all the countries of the world.

Do you mean names of the countries? In which language, and according to which authority? There are disputes on what is a country, and also on country names.

There is an official (ISO) standard on country _codes_, and the naming authority's pages are at http://www.iso.org/iso/en/prods-services/iso3166ma/index.html (I haven't checked whether they have the data in XML format.)

But names are a different issue; the names in ISO 3166 are just for identifying the countries, not to be taken as official names.

However there are good The Unicode Consortium has Common Locale Data Repository, which is intended to contain reliable information about a large amount of localized data, such as country names, language names, time zone names, etc., in a large number of languages, in an XML format, specifically in LDML language.

I would say that CLDR, though with lots of unconfirmed data, is already the best available general resource on such matters. It's Web site is http://www.unicode.org/cldr/ and e.g. most of the current locale data for "en" (English, generically), containing country names in the <territories> element, is at http://oss.software.ibm.com/cvs/icu/~checkout~/locale/common/main/en.xml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top