title: Reading a text file or XML file in Android java
body: <p>I am currently working on a group project to build an Android game. I have been delegated the task of building a PC based level editor (which is all done).</p>
  
  <p>All I have to do now is decide on the file format for the map that is outputted. At the moment it is just a standard text file with different numbers to represent different tiles; E.G 0=path 1=wall 2=enemy.</p>
  
  <pre><code>1 1 1 1 1 1 1 1
  1 0 0 0 2 0 0 1
  1 1 1 1 1 1 1 1
  </code></pre>
  
  <p>The actual Android game then takes this file and stores the values into a 2D Array. However those who are making the actual game are having difficulty opening a text file, and others have told me it has to be done using an XML file. I have now been asked to find a away to take in this input.</p>
  
  <p>Could someone tell me how I would read the text file and put the values into a <strong>int</strong> <em>array[][]</em> ? Or if it is easier, use an XML file and tell me how to format that file and read the values into a <strong>int</strong> <em>array[][]</em></p>
  
  <p>Any help would be appreciated as I didn't learn how to use Android so I find this quite difficult.</p>
  
  <p>Many thanks/</p>