i have a database that contains countries and cities. i want to export this information to a xml document, but wonder how to structure it.
should i do it like this:
<country>
<name>Canada</name>
<city>
<name>Toronto</name>
<population>1423200</population>
</city>
<city>
<name>Ottawa</name>
<population>1423200</population>
</city>
</country>
or like this:
<country>
<name>Canada</name>
<cities>
<city>
<name>Toronto</name>
<population>1423200</population>
</city>
<city>
<name>Ottawa</name>
<population>1423200</population>
</city>
</cities>
</country>
or like this:
<entity>
<country>Canada</country>
<city>Ottawa</city>
<city_population>1423200</city_population>
</entity>
<entity>
<country>Canada</country>
<city>Toronto</city>
<city_population>1423200</city_population>
</entity>
what are the pros and cons with each of them? is there another way of structuring?
which of them is best for future changes (adding data).
my first time to structure in xml, so would be great with feedbacks/hints!