title: android: How to load lot of data (xml file) and keep it throughout the application
body: <p>I'm designing an app which involves parsing a large XML(which include lots of text) and keeping the serialised data accessible throughout the application. I intend to have a data object which will keep the data stored and some classes can access the data. I alway need to show only part of the text.</p>
  
  <p>yes my problem is very similar to this <a href="https://stackoverflow.com/questions/11930775/android-how-to-keep-data-persistent-throughout-the-application">question</a> maybe it's the same problem, but I don't want to use this solution, if is it possible.</p>
  
  <p>I would like to know how to load the data, where to load it and how to keep it accessible throughout the application. It's impossible to load it everytime in <code>onCreate()</code> method, for example when the screen orientation is changed.</p>
  
  <p>Best way for me, would be if I could load (parse) the xml file into one object and this object keeps accessible throughout the application, but I don't know where, how to load it and how to keep it accessible throughout the application. This object has everything what I need.</p>
  
  <p>some possible solutions:</p>
  
  <ul>
  <li>Singleton (this would load data into one object) use <a href="https://stackoverflow.com/a/456918/2211656">this</a> or something else ?</li>
  <li>Using a SQLite solution like <a href="https://stackoverflow.com/questions/11930775/android-how-to-keep-data-persistent-throughout-the-application">there</a> (same link as above)  (I don't want use this)</li>
  <li>Use lazy loading (load the part of text, which I actualy need) (I don't want use this as well)</li>
  </ul>
  
  <p>Could someone say what would be best solution ? And describe how to do it ?</p>
  
  <p>(Sorry for my english)</p>
  
  <ul>
  <li><p><strong>EDIT 1:</strong> xml structure:</p>
  
  <pre><code>&lt; root &gt;
       &lt; some elements &gt;
       &lt; /some elements &gt;
  
       &lt; element with lot of text &gt;
           text.....
       &lt; /element with lot of text &gt;
  
       &lt; element with lot of text &gt;
           text.....
       &lt; /element with lot of text &gt;
            .
            .
            .
       &lt; element with lot of text &gt;
           text.....
       &lt; /element with lot of text &gt;
  &lt; /root &gt;
  </code></pre></li>
  </ul>
  
  <p>if it will be helpful. Text in one element usually includes 5000 - 15000 characters.</p>