activity call throws error
<p>I have the code below that is supposed to parse an XML document.</p>

<p>I'm getting an error stating that 'activity cannot be resolved'.  </p>

<p>How can I get my program to recognize my activity?</p>

<p>Thanks!</p>

<pre><code>package me.HelloAndroid;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import android.util.Log;
import java.io.IOException;
import android.app.Activity;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;

public class EncounterGenerator {

String encounterText;
int testint;
private String xmlValue;
private int encounterID;
public EncounterStats stats;

public EncounterGenerator() {
    Resources res = activity.getResources();
    XmlResourceParser xpp = res.getXml(R.xml.encounters);

    xpp.next();

    int eventType = xpp.getEventType();
    while (eventType != XmlPullParser.END_DOCUMENT)
    { ... }
</code></pre>
