java.lang.RuntimeException: Unable to start activity ComponentInfo Error
<p>I wanna ask something about android programming..
I create a class that return display from rss xml file to android but i get some error </p>

<blockquote>
  <p>04-08 14:37:19.162: E/AndroidRuntime(381):
  java.lang.RuntimeException: Unable to start activity
  ComponentInfo{com.example.xmlreader/com.example.xmlreader.MainActivity}:
  java.lang.NullPointerException</p>
</blockquote>

<p><strong>Code:</strong></p>

<pre><code>static final String URL = "http://api.androidhive.info/pizza/?format=xml";
// XML node keys
static final String KEY_ITEM = "item"; // parent node
static final String KEY_ID = "id";
static final String KEY_NAME = "name";
static final String KEY_COST = "cost";
static final String KEY_DESC = "description";

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //setContentView(R.layout.activity_main);

    ArrayList&lt;HashMap&lt;String, String&gt;&gt; menuItems = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();

    XMLParser parser = new XMLParser();
    String xml = parser.getXMLFromURL(URL); // getting XML
    Document doc = parser.getDomElem(xml); // getting DOM element

(*) NodeList nl = doc.getElementsByTagName(KEY_ITEM);
    // looping through all item nodes &lt;item&gt;
    for (int i = 0; i &lt; nl.getLength(); i++) {
        // creating new HashMap
        HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
        Element e = (Element) nl.item(i);
        // adding each child node to HashMap key =&gt; value
        map.put(KEY_ID, parser.getValue(e, KEY_ID));
        map.put(KEY_NAME, parser.getValue(e, KEY_NAME));
        map.put(KEY_COST, "Rs." + parser.getValue(e, KEY_COST));
        map.put(KEY_DESC, parser.getValue(e, KEY_DESC));

        // adding HashList to ArrayList
        menuItems.add(map);
    }

    // Adding menuItems to ListView
    ListAdapter adapter = new SimpleAdapter(this, menuItems,
            R.layout.list_item,
            new String[] { KEY_NAME, KEY_DESC, KEY_COST }, new int[] {
                    R.id.name, R.id.desciption, R.id.cost });

    setListAdapter(adapter);

    // selecting single ListView item
    ListView lv = getListView();

    lv.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                int position, long id) {
            // getting values from selected ListItem
            String name = ((TextView) view.findViewById(R.id.name)).getText().toString();
            String cost = ((TextView) view.findViewById(R.id.cost)).getText().toString();
            String description = ((TextView) view.findViewById(R.id.desciption)).getText().toString();

            // Starting new intent
            Intent in = new Intent(getApplicationContext(), SingleActivity.class);
            in.putExtra(KEY_NAME, name);
            in.putExtra(KEY_COST, cost);
            in.putExtra(KEY_DESC, description);
            startActivity(in);

        }
    });
}
</code></pre>

<p>the error in line 38 or line i was give (*) this mark...
pleas help me...</p>
