2012-04-19 2 views
1

RSS 피드를 통해 블로그에서 일련의 게시물을 구문 분석합니다. 다행히도 text()에 일련의 html 태그가 포함되어 있는데 replace() 메소드를 사용했지만, 다음 오류 : The method replace(char, char) in the type String is not applicable for the arguments (String, String) Here is my code: String stripString = mDesCollect.replace("{\\<.*?\\>}", "" (블랙 베리 개발 중) 이 텍스트를 제거하는 방법이 필요하십니까? 여기 텍스트의 예입니다 매우Blackberry Java에서 html 태그 문자열 스트립링

<!-- [DocumentBodyStart:4accc09d-2c60-4371-956f-1293c4a9746a] --><div class="jive-rendered-content"><p>Hello everyone. Blessed be the God and Father of our Lord Jesus Christ, who hath blessed us with all spiritual blessings in heavenly places in Christ (Ephesians 1:3). </p><p>We're in the second week of this special month of preparation. We'll pray at 12noon, 5pm and 10pm (GMT+1) for 15min, speaking in tongues fervidly and declaring words of faith regarding any situation of concern. God bless you.</p></div><!-- [DocumentBodyEnd:4accc09d-2c60-4371-956f-1293c4a9746a] --> 

감사, 나는 어떤 도움을 주셔서 감사합니다! 정규식을 사용하여 이후

+1

보는 의미? – SLaks

+0

교체가 빨간색으로 강조 표시되었습니다. – donaldepig

+0

_ 어떤 오류가 발생 했습니까? – SLaks

답변

0

나쁜 형태 (RegEx match open tags except XHTML self-contained tags 참조), "작업 거부"무엇 http://jsoup.org

+0

안녕하세요 maksimov,이 jsoup 라이브러리 (jsoup 1.6.3)를 사전 검증하는 데 몇 가지 문제가 있습니다. 문제에 대해 제안 된 해결책을 원합니다. – donaldepig

+0

문제 : org.jsoup.Connection 클래스를 사전 검증하는 중 오류가 발생했습니다. java/lang/NoClassDefFoundError : java/lang/Object – donaldepig

+0

@donaldepig, BB 관련 사항이어야합니다. 나는 두렵다. 나는이 사실을 잘 모른다. 미리 확인하는 것과 유사한 문제가 있으면 Google에 문의하십시오. – maksimov