package com.parse;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;

import net.htmlparser.jericho.Element;
import net.htmlparser.jericho.HTMLElementName;
import net.htmlparser.jericho.Source;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

public class JerichoActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        String yourUrl = "http://job.konkuk.ac.kr/data/data_list.asp?type=form";
        TextView tv = (TextView)findViewById(R.id.mainTextView);
        tv.setText(getHtmltoText(yourUrl));       
   }
   
    public String getHtmltoText(String UrlString)
    {
     
     Source source = null;
     //String content = null;
     String href = "바보";
     String label = null;
     String list = null;
     String li = null;
        try{
         source = new Source(new URL("UrlString);
            source.fullSequentialParse();
            //content = source.getTextExtractor().toString(); //문자열만 뽑아오는 함수
            //content = new String(content.getBytes(source.getEncoding()),"EUC-KR"); //인코딩 타입 설정
            List<Element> atags = source.getAllElements(HTMLElementName.TD);
            Toast.makeText(JerichoActivity.this, "파싱을 시작합니다.", Toast.LENGTH_SHORT).show();
            for(int i=0; i < atags.size(); i++)
            {
                 Element e = (Element) atags.get(i);
                 href = e.getAttributeValue("class");
                 label = e.getContent().getTextExtractor().toString();
                 if(href.equals("board_con"))      오류나는 부분입니다!!!!!!!!!!!!!!!!!!!!!!!!!!!
                 {
                  list += href + "!!!!!" +label;
                 }  
            }
            Toast.makeText(JerichoActivity.this, "파싱이 종료되었습니다.", Toast.LENGTH_SHORT).show();
        }catch(MalformedURLException e) {
              e.printStackTrace();
        }
        catch(IOException e) {
          e.printStackTrace();
        }
        return list;
    }
}

 

 

대체왜 오류인지 모르겠어요ㅠㅠ

ActivityThread.performLaunchActivity(ActivityThread$ActivityCientRecord, Intent) 오류가 났어요 ㅠㅠ