html파싱을 할려고합니다.
근데 사진처럼저런 이미지들
링크기가걸린이미지
홈페이지 구인광고홈페이지보면
저런것들있잖아요
저런걸
파싱하고싶은데
어떻게하나요
그리고 두번재사진처럼
테이블이아닌
div dd dl 이런식으로되잇는데
저건
테이블이 어떤거고 tr이언껀거고 td가어떤거죠
즉 table대신 div이런식으로 좀알려주세요
Element table = (Element) source.getAllElements(HTMLElementName.DL).get(80);
System.out.println("테이블 개수!!!!" + source.getAllElements(HTMLElementName.DL).size());
//테이블 안의 TR 개수
int tr_count = table.getAllElements(HTMLElementName.DD).size();
Element tr = null;
HashMap<String, String> hm = null;
for(int i=1; i<tr_count; i++)
{
tr = (Element) table.getAllElements(HTMLElementName.DD).get(i);
hm = new HashMap<String, String>();
hm.put("writer", ((Element) tr.getAllElements(HTMLElementName.DD).get(0)).getContent().toString());
data.add(hm);
}
제소스인데
요기에 DL DD이런건 어디다넣어야할지모르겟어요
밑에 질문게시판이 있는것 같은데요