umpirsky / locale-list

List of all locales with names and codes in all languages and all data formats.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XML structure is probably wrong (and weird at least)

boekabart opened this issue · comments

First off: Thank you for this and the country list as well!

I ended up using the json version because the xml of both projects is wrong or at least weird. Take a look:

<?xml version="1.0" encoding="utf-8"?>
<values>
    <item>
        <id>af</id>
        <![CDATA[Afrikaans]]>
        <value />
    </item>
    <item>
        <id>af_NA</id>
        <![CDATA[Afrikaans (Namibia)]]>
        <value />
    </item>

I presume that the intent was to have the value inside the <value> tag like so:

<?xml version="1.0" encoding="utf-8"?>
<values>
    <item>
        <id>af</id>
        <value><![CDATA[Afrikaans]]></value>
    </item>

The current format is probably technically correct XML, but very hard to parse by most libraries because the <item> element mixes both child elements and text; which is unusual.

Ouch, that does look wrong, thanks!