title: How to convert xml data into an arraylist of userdefined objects
body: <p>Sample Class :</p>
  
  <pre><code>Class Circle
  {
      String id;
      double radius;
      Center center;
  
      Center
      {
          int x;
          int y;
      }
  }
  </code></pre>
  
  <p>I would like to store info in an xml file and at run time read from it and populate an array-list of Circle objects. I tried looking at the android inbuilt parser but i dont quiet under stand how it works , also not sure which parser is the best for this operatinn.</p>
  
  <p>Sample XML</p>
  
  <pre><code>&lt;Circles&gt;
      &lt;circle1&gt;
          &lt;id&gt;&lt;/id&gt;
          &lt;radius&gt;&lt;/radius&gt;
          &lt;center&gt;
              &lt;x&gt;&lt;/x&gt;
              &lt;y&gt;&lt;/y&gt;
          &lt;/center&gt; 
      &lt;/circle1&gt;
      &lt;circle2&gt;
          &lt;id&gt;&lt;/id&gt;
          &lt;radius&gt;&lt;/radius&gt;
          &lt;center&gt;
              &lt;x&gt;&lt;/x&gt;
              &lt;y&gt;&lt;/y&gt;
          &lt;/center&gt;
      &lt;/circle2&gt; 
  &lt;/Circles&gt;
  </code></pre>
  
  <p>As i am currently not able to use a database and since the data is permanent, i thought xml would be a good choice. I am open to other solutions as well. </p>