Free XML File resource containing countries?

Discussion in 'XML' started by mr_burns, Nov 26, 2004.

  1. mr_burns

    mr_burns Guest

    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>
     
    mr_burns, Nov 26, 2004
    #1
    1. Advertising

  2. 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.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Nov 26, 2004
    #2
    1. Advertising

  3. mr_burns

    Andy Dingley Guest

    On 26 Nov 2004 04:51:04 -0800, (mr_burns) wrote:

    >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

    --
    Smert' spamionam
     
    Andy Dingley, Nov 26, 2004
    #3
  4. (mr_burns) wrote:

    > 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 news: 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

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Nov 26, 2004
    #4
  5. Jukka K. Korpela wrote:
    > (mr_burns) wrote:
    >
    >>What I am looking for is an XML file containing all the countries of
    >>the world.

    > ...
    > 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.)


    They do have it:
    http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/iso_3166-1_xml_en.zip

    --
    To reply by e-mail, please remove the extra dot
    in the given address: m.collado -> mcollado
     
    Manuel Collado, Nov 29, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wally

    List of countries

    Wally, Aug 13, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    520
    Randy Birch
    Aug 15, 2004
  2. Onur Bozkurt

    countries and related cities database...?

    Onur Bozkurt, Jul 23, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    709
    paul_cool_fl
    Feb 27, 2009
  3. davidinvestworld
    Replies:
    1
    Views:
    647
    davidinvestworld
    Mar 28, 2006
  4. nude_aishwarya
    Replies:
    1
    Views:
    661
    nude_aishwarya
    Feb 7, 2007
  5. slinky
    Replies:
    1
    Views:
    498
    John Timney \(MVP\)
    Jun 18, 2007
Loading...

Share This Page