在 Blackberry Java 中条带化一串 html 标签



我正在通过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("{\<.*?\>}", ""。需要去除标签的此文本的方法吗?下面是文本的示例:

<!-- [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] -->  

非常感谢,我感谢任何帮助!

由于使用正则表达式是一种糟糕的形式(请参阅正则表达式匹配开放标签,但 XHTML 自包含标签除外),请查看 http://jsoup.org

最新更新