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