I have a multi-dimensional array such as:
String[][] greatCities = new String[2][2];
greatCities[0][0] = "Vancouver";
greatCities[0][1] = "Charlottetown";
greatCities[1][0] = "Zürich";
greatCities[1][1] = "Bern";
Now I'm looking for a good way to save the structure (no code) this array to a xml file. Best solution I have so far is:
<GreatCities>
<Item index0="0" index1="0">Vancouver</Item>
<Item index0="0" index1="1">Charlottetown</Item>
<Item index0="1" index1="0">Zürich</Item>
<Item index0="1" index1="1">Bern</Item>
</GreatCities>
Does anyone have a better solution?