title: Open xml file on listview item click
body: <p>I'm trying to open a new xml or text file when the user select an item on listview. Below is my code:
  Original Question--></p>
  
  <p>MainActivity.java</p>
  
  <pre><code>package com.example.listview;
  
  import android.app.ListActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.Toast;
  
  public class MainActivity extends ListActivity {
    public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      String[] values = new String[] { "Android", "iPhone", "WindowsMobile",
          "Blackberry", "WebOS", "Ubuntu", "Windows7", "Max OS X",
          "Linux", "OS/2" };
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
          android.R.layout.simple_list_item_1, values);
      setListAdapter(adapter);
    }
  
    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
      String item = (String) getListAdapter().getItem(position);
      Toast.makeText(this, item + " selected", Toast.LENGTH_LONG).show();
    }
  } 
  </code></pre>
  
  <p>When <code>onListItemClick</code> is triggered I want to open xml file which has some data.
  When "Android" is selected android.xml, shows up.
  When "iPhone" is selected iphone.xml, shows up.</p>