locale-list icon indicating copy to clipboard operation
locale-list copied to clipboard

XML structure is probably wrong (and weird at least)

Open boekabart opened this issue 4 years ago • 1 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.

boekabart avatar Jul 03 '20 08:07 boekabart

Ouch, that does look wrong, thanks!

umpirsky avatar Jul 03 '20 12:07 umpirsky