Reading Statics from an Array Named in an Array?
<p>I have a load of hierarchal static configuration data that I want to read, for example;</p>

<pre><code>&lt;string-array name="Root"&gt;
&lt;item&gt;Array1&lt;/item&gt;
&lt;item&gt;Array2&lt;/item&gt;
&lt;item&gt;Array3&lt;/item&gt;
&lt;/string-array&gt;

&lt;string-array name="Array1"&gt;
&lt;item&gt;Array1 Data1&lt;/item&gt;
&lt;item&gt;Array1 Data2&lt;/item&gt;
&lt;item&gt;Array1 SubArray1&lt;/item&gt;
&lt;item&gt;Array1 SubArray2&lt;/item&gt;
&lt;item&gt;Array1 SubArray3&lt;/item&gt;
&lt;/string-array&gt;

&lt;string-array name="Array1 SubArray1"&gt;
&lt;item&gt;Array1 SubArray1 Data1&lt;/item&gt;
&lt;item&gt;Array1 SubArray1 Data2&lt;/item&gt;
&lt;/string-array&gt;

&lt;string-array name="Array2"&gt;
&lt;item&gt;Array2 Data1&lt;/item&gt;
&lt;item&gt;Array2 Data2&lt;/item&gt;
&lt;item&gt;Array2 SubArray1&lt;/item&gt;
&lt;item&gt;Array2 SubArray2&lt;/item&gt;
&lt;item&gt;Array2 SubArray3&lt;/item&gt;
&lt;/string-array&gt;

&lt;string-array name="Array1 SubArray3"&gt;
&lt;item&gt;Array2 SubArray3 Data1&lt;/item&gt;
&lt;item&gt;Array2 SubArray3 Data2&lt;/item&gt;
&lt;/string-array&gt;
</code></pre>

<p>Putting in 1,1 would give me;<br>
Array1 Data1, Array1 Data2, Array1 SubArray1 Data1, Array1 SubArray1 Data2</p>

<p>While putting in 2,3 would give me;<br>
Array2 Data1, Array2 Data2, Array2 SubArray3 Data1, Array2 SubArray3 Data2</p>

<p>What I want to do is something like;</p>

<pre><code>Resources res = getResources();
String[] RootArray = res.getStringArray(R.array.Root);
String[] Array = res.getStringArray(R.array.RootArray[1]);
String[] SubArray = res.getStringArray(R.array.Array[1]);
</code></pre>

<p>Is there a way to get this sort of thing to work?</p>

<p>Note: The Array sizes are not necessarily fixed.</p>

<p>Thanks in advance.<br>
Mark</p>
