title: Architecture design for multi-hierarchial, dynamic page creation from xml in android
body: <p>I am designing a system where in I retrieve a multi layered xml and dynamically design a hierarchial application using the data. The XML looks like</p>
  
  <pre><code>&lt;XML&gt;
   &lt;G ID&gt;
   &lt;G Desc&gt;
      &lt;I Id&gt;
      &lt;I Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
      &lt;I Id&gt;
      &lt;I Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
  &lt;G ID&gt;
  &lt;G Desc&gt;
      &lt;I Id&gt;
      &lt;I Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
      &lt;I Id&gt;
      &lt;I Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
          &lt;J ID&gt;
          &lt;J Desc&gt;
  </code></pre>
  
  <p>and so on..</p>
  
  <p>There will be undefined number of G Id and I Id, j ID depending on runtime.
  The user clicks the list view of G ID specific item to get I id list for that item. However the I id and J id list depends on what G Id was clicked.</p>
  
  <p>The approach that I am thinking is to create 3 activities and pass data between them, change the list view on each activity dynamically on click. The parsing happens initially and data is percolated between activities.</p>
  
  <p>Any pointers appreciated.</p>