Новичок в XML и DTD, я пытаюсь разобрать этот XML-файл в DTD, но не уверен, правильно ли я это делаю. Любая помощь будет принята с благодарностью! Вот пример моего кода
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!ELEMENT ConutryList (CountryReccord) +>
<!ATTLIST CountryList
xmlns CDATA #FIXED ' '>
<!ELEMENT CountryRecord (name,alpha-2,alpha-3,country-code,iso_3166-2,region,sub-region,intermediate-region,region-code,sub-region-code,
intermediate-region-code,capital-city,currency,currency-code, population)>
<!ATTLIST CountryRecord
xmlns CDATA #FIXED ' '>
... more DTD codes but limited space
Выше DTD, ниже XML.
<CountryList>
<CountryRecord>
<name> Afganistan </name>
<alpha-2> AF </alpha-2>
<country-code> AFG </country-code>
<iso_3166-2> </iso_3166-2>
<region> </region>
<sub-region> </sub-region>
<intermediate-region> </intermediate-region>
<region-code> </region-code>
<sub-region-code> </sub-region-code>
<intermediate-region-code> </intermediate-region-code>
<capital-city> </capital-city>
<currency> </currency>
<currency-code> </currency-code>
<population> </population>
</CountryRecord>
</CountryList>