XmlPullParserException:unterminated entity
<p>I have a problem with my Android project. I am trying to pull information from an XML file which for the moment is stored in WAMP project file. But everytime I run the project it comes up with a XmlPullParser exception. I have used the same code for a different activity and it works just fine. Can't figure out the error. here's the code</p>

<pre><code>public class MondayActivity extends Activity{

    static String LIST_URL = "http://192.168.1.10/monday.xml";
    ArrayList&lt;HashMap&lt;String, String&gt;&gt; timetableList;
    Handler mHandler;
    ClassesDownloadTask mTask;
    ProgressDialog mProgress;

    public Object onRetainNonConfigurationInstance(){
        Log.v("XML", "Saving data");
        return timetableList;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        Log.v("HIT", "onCreate triggered");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.monday);
        loadTimetableLists();
        displayTimetableLists();

        mHandler = new Handler(){
            public void handleMessages(Message mgs){
                displayTimetableLists();
                mProgress.dismiss();
                if(mgs.what == 1){
                    new AlertDialog.Builder(MondayActivity.this)
                        .setTitle("Error")
                        .setPositiveButton(android.R.string.ok, null)
                        .setMessage("Failed to download packages")
                        .show();
                }else{
                    displayTimetableLists();
                }
            }
        };
        //startBackgroundTask();
        //displayTourPackages();
        timetableList = (ArrayList&lt;HashMap&lt;String,String&gt;&gt;)
        getLastNonConfigurationInstance();
        if(timetableList == null){
            startBackgroundTask();
        }else{
            displayTimetableLists();
        }
    }

    private void startBackgroundTask(){
        mProgress = ProgressDialog.show(this, "Loading tour packages",
                "Please wait...", true);
        mProgress.setCancelable(true);
        mProgress.setOnCancelListener(new OnCancelListener(){

            public void onCancel(DialogInterface args0){
                MondayActivity.this.finish();
            }
        });
        mProgress.show();
        mTask = new ClassesDownloadTask();
        mTask.execute();
    }

    private void loadTimetableLists(){

        try{
            Log.v("HIT", "loadTimetableLists triggered");
            HttpParams params = new BasicHttpParams();
            HttpConnectionParams.setConnectionTimeout(params, 10000);
            HttpConnectionParams.setSoTimeout(params, 1000);

            DefaultHttpClient client = new DefaultHttpClient(params);
            HttpGet get = new HttpGet(LIST_URL);
            HttpResponse res = client.execute(get);
            int code = res.getStatusLine().getStatusCode();

            if (code != 200){
                throw new Exception("Invalid status code: " + code);
            }
            Log.v("XML", "Successfully fetched XML file");
            InputStream is = res.getEntity().getContent();

            timetableList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
            XmlPullParserFactory parseCreator = XmlPullParserFactory.newInstance();
            XmlPullParser parser = parseCreator.newPullParser();
            parser.setInput(is, null);

            int event;
            String name = null;
            String time = null;
            String type = null;
            String room = null;
            String tag = null;
            while((event = parser.next()) != XmlPullParser.END_DOCUMENT){
                if(event == XmlPullParser.START_TAG){
                    tag = parser.getName();
                    if("class".equals(tag)){
                        name = time = type = room = "";
                    }
                } else if(event == XmlPullParser.TEXT){
                    if("time".equals(tag)){
                        time = parser.getText();
                    } else if("name".equals(tag)){
                        name = parser.getText();
                    }else if ("type".equals(tag)){
                        type = parser.getText();
                    }else if ("type".equals(tag)){
                        type = parser.getText();
                    }
                } else if (event == XmlPullParser.END_TAG){
                    if ("tour".equals(parser.getName())){
                        HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
                        map.put("name", name);
                        map.put("time", time);
                        map.put("type", type);
                        map.put("room", room);
                        timetableList.add(map);
                        Log.v("XML", "loaded package: " + name);
                    }
                    tag = null;
                }
            }
        }catch (Exception e){
            Log.v("XML", "Error fetching monday.xml", e);
        }
    }

    private void displayTimetableLists(){
        Log.v("HIT", "displayTourPackages triggered");
        String from[] = {"name", "time", "type","room"};
        int to[] = {R.id.tName, R.id.tTime, R.id.typeTimetable,R.id.roomTimetable};
        SimpleAdapter a  = new SimpleAdapter(this, timetableList, R.layout.timetable_list, from, to);
        ListView l = (ListView) findViewById (R.id.courseList);
        l.setAdapter(a);
    }

    public class ClassesDownloadTask extends AsyncTask&lt;Void,Void,Void&gt;{
        boolean bFailed = false;
        @Override
        protected Void doInBackground(Void... params){
            Log.v("XML", "Loading data from AsyncTask");
            loadTimetableLists();
            if(!isCancelled()){
                mHandler.sendEmptyMessage(bFailed ? 1:0);
            }
            return null;
        }
    }
}
</code></pre>
