메뉴 건너뛰기

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)");

번호 제목 날짜 조회 수
53 [gson]mongodb의 api를 이용하여 데이타를 가져올때 "com.google.gson.stream.MalformedJsonException: Unterminated object at line..." 오류발생시 조치사항 2017.12.11 7579
52 Caused by: java.sql.SQLNonTransientConnectionException: Could not read resultset: unexpected end of stream, read 0 bytes from 4 오류시 확인/조치할 내용 2016.10.31 6934
51 List<Map<String, String>>형태의 데이타에서 중복제거 하는 방법 2016.12.23 5059
50 [ftgo_application]Unable to infer base url오류 발생시 조치방법 2023.02.20 4825
49 python test.py실행시 "ImportError: No module named pyspark" 혹은 "ImportError: No module named py4j.protocol"등의 오류 발생시 조치사항 2017.07.04 4574
48 Mybatis foreach 문법정리(상황에 따른 사용법) 2015.11.10 4430
47 python2.7.4에서 Oracle DB(11.2)를 사용하기 위한 설정(RPM을 이용하여 RHEL 7.4에 설치) 2021.11.26 4415
46 ./gradlew :composeDown 및 ./gradlew :composeUp 를 성공했을때의 메세지 2023.02.20 4401
45 lagom-linux용 build.sbt파일 내용 2017.10.12 4384
44 마이바티스(MyBatis)쿼리로그 출력및 정렬하기 2015.12.01 4345
» jsoup 사용 예제 2014.06.06 4332
42 mybatis와 spring을 org.apache.commons.dbcp2.BasicDataSource의 DataSource로 연동할때 DB설정(참고) 2016.10.31 4324
41 vuestorefrontui.io를 이용한 front end project 생성하기 2022.02.06 4175
40 AIX 7.1에 Python 2.7.11설치하기 2016.10.06 4155
39 CentOS6에 python3.5.1 소스코드로 빌드하여 설치하기 2016.05.27 4110
38 scala-eclipse 다운로드 2019.06.09 4059
37 embedded-cassandra의 data 저장위치 2019.06.09 3983
36 Class.forName을 이용한 메서드 호출 샘플소스 2016.12.21 3935
35 [Jsoup]특정페이지를 jsoup을 이용하여 파싱하는 샘플소스 2017.04.18 3820
34 lagom에서 제공하는 초기 생성기능을 이용하여 생성한 프로젝트의 소스 파악 2018.01.16 3715
위로