title: Nested Arrays in Android xml
body: <p>Previously I had a simple string-array that contained a URL it looked like</p>
  
  <pre><code>    &lt;string-array name="drawerlinkitems"&gt;
        &lt;item&gt;http://www.google.com&lt;/item&gt;
        &lt;item&gt;http://www.google2.com&lt;/item&gt;
        &lt;item&gt;http://www.google3.com&lt;/item&gt;
      &lt;/string-array&gt;
  </code></pre>
  
  <p>and i was able to access the values with the call</p>
  
  <pre><code>return getResources().getStringArray(R.array.drawerlinkitems)[number];
  </code></pre>
  
  <p>pretty simple stuff.</p>
  
  <p>my problem at this point is I want to do some more actions other than just grabbing the url, so i would like to build a nested array, like this:</p>
  
  <pre><code>&lt;string-array name="draweritems"&gt;
      &lt;item&gt;
          &lt;link&gt;http://www.google.com&lt;/link&gt;
          &lt;title&gt;Google&lt;/title&gt;
          &lt;icon&gt;soon&lt;/icon&gt;
      &lt;/item&gt;
      &lt;item&gt;
          &lt;link&gt;http://www.google2.com&lt;/link&gt;
          &lt;title&gt;Google2&lt;/title&gt;
          &lt;icon&gt;soon&lt;/icon&gt;
      &lt;/item&gt;
      &lt;item&gt;
          &lt;link&gt;http://www.google3.com&lt;/link&gt;
          &lt;title&gt;Google3&lt;/title&gt;
          &lt;icon&gt;soon&lt;/icon&gt;
      &lt;/item&gt;
  &lt;/string-array&gt;
  </code></pre>
  
  <p>and then access it, using something like</p>
  
  <pre><code>getResources().getStringArray(R.array.draweritems)[number].getString[link];
  </code></pre>
  
  <p>or</p>
  
  <pre><code>getResources().getStringArray(R.array.draweritems)[number].getString[1];
  </code></pre>
  
  <p>(obviously i made the getString part up)</p>
  
  <p>I can't figure out if it's even possible to do this in string-arrays, and if not what the replacement option is. If it is, i'm not sure exactly how to reference the string array to get the child values out of the item parent. i'm also not tied down to this type of solution if there's a superior way to do this that you know of. any help would be much appreciated.</p>