메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


java/jsp jsoup 사용 예제

총관리자 2014.06.06 13:50 조회 수 : 1506

문자열 : <table width="100%" align="center"/>


1. table의 width=100% OR align=center만 추출하는 경우

  Document document =Jsoup.parse(htmlString);

                  document.select("table[width=100%],table[align=center]");


2. AND 연산(width=100%이고 align=center인 경우)

가. Elements tables = document.select("table[width=100%]").select("table[align=center]");

나. Elements element =document.select("table[align=center]");

                    element =element.select("table[width=100%]");


3. AND 연산(width=100%이고 align=center이고 table안에 문자열이 text인 경우)

  Elements tables = document.select("table[width=100%].select("table[align=center]:contains(text)");

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로