title: Caching Objects parsed from XML in Android
body: <p>I have an Android application which talks to a public Data-API by calling URLs. The API returns XML which describes search results or detailed Data of a particular dataset.</p>
  
  <p>In my Application i retrieve this data and parse it to Java Objects to display them in a ListView for example.</p>
  
  <p>edit: Just to make it clearer: In my Application you can search for music Artists and get their whole discographic information. I Retrieve the list of <code>Releases</code> and display them in a ListView. (No problem right here, because the results of the same search request can change any minute i have to retrieve this data everytime a search request is issued).</p>
  
  <p>Now i have a list with all the LPs the Beatles produced (for example). I can then click one particular LP and view the <code>Details</code> such as the Release Year and the Tracklist.</p>
  
  <p>What i want to cache is the <code>Details</code> data and i'm currently thinking of which is the best way to do this. I thought of:</p>
  
  <ul>
  <li>Retrieving the XML data once and store the XML Data in the SQLite Database (that would imply, that i have to parse the data everytime i want to access it again).</li>
  <li>Retrieving the XML data once, parsing it once and somehow store the serialized JavaObject into the SQLite Database as ByteStream. (so all the time consuming work would be done just once).</li>
  </ul>
  
  <p>What do you think is the best version or is there maybe another better way to achieve caching the results?</p>