메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


java/jsp jsoup 사용 예제

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

문자열 : <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)");

번호 제목 날짜 조회 수
» jsoup 사용 예제 2014.06.06 4332
52 Mybatis foreach 문법정리(상황에 따른 사용법) 2015.11.10 4430
51 mybais #과 $의 차이점 2015.11.10 3465
50 마이바티스(MyBatis)쿼리로그 출력및 정렬하기 2015.12.01 4345
49 java quartz 시간 설정 참고사항 2015.12.16 3146
48 CentOS6에 python3.5.1 소스코드로 빌드하여 설치하기 2016.05.27 4111
47 python 2.6.6에서 print 'A=' 형태의 사용이 python 3.5.1에서 오류(SyntaxError: Missing parentheses in call to 'print') 발생함.. 2016.05.27 2928
46 Windows에서 sbt개발환경 구축 방법(링크) 2016.06.02 2087
45 servlet-api를 jar형태로 build할때 포함하지 말고 java 설치 위치의 jre/lib/ext에 복사하여 사용하는것이 좋다. 2016.08.10 2838
44 초기 오류(java.lang.NoSuchMethodError)에 따른 후속 작업에서 오류(java.lang.NoClassDefFoundError)가 발생되는 상황(quartz에서 주기적으로 작업시) 2016.08.29 2922
43 [Mybatis]Spring과 연동하지 않고 Java+Mybatis 형태의 프로그램 샘플소스 2016.09.01 3209
42 DBCP Datasource(org.apache.commons.dbcp.BasicDataSource) 설정 및 속성 설명 2016.09.26 3538
41 AIX 7.1에 Python 2.7.11설치하기 2016.10.06 4155
40 VisualVM 1.3.9을 이용한 JVM 모니터링 file 2016.10.27 3389
39 Caused by: java.sql.SQLNonTransientConnectionException: Could not read resultset: unexpected end of stream, read 0 bytes from 4 오류시 확인/조치할 내용 2016.10.31 6936
38 mybatis와 spring을 org.apache.commons.dbcp2.BasicDataSource의 DataSource로 연동할때 DB설정(참고) 2016.10.31 4324
37 java스레드 덤프 분석하기 file 2016.11.03 2114
36 Eclipse실행시 Java was started but returned exit code=1이라는 오류가 발생할때 조치방법 2016.11.07 3369
35 Collections.sort를 이용한 List<User>형태의 데이타 정렬(숫자, 문자에 대해서 각각 asc/desc및 복합정렬) 2016.12.15 3380
34 Collections.sort를 이용한 List<Map<String, String>>형태의 데이타 정렬 소스 2016.12.15 3471
위로