[Htmlparser-user] StringBean: Removing unwanted links
Brought to you by:
derrickoswald
From: Riaz u. <ru...@ya...> - 2006-05-07 18:59:21
|
Hi, I have this code snippet from htmlparser.sourcefourge.net for StringBean: StringBean sb = new StringBean (); sb.setLinks (false); sb.setReplaceNonBreakingSpaces (true); sb.setCollapse (true); sb.setURL ("http://news.yahoo.com/s/ap/20060507/ap_on_re_mi_ea/iraq;_ylt=AoeY5mkiWMfGQ8KbE6W5xxas0NUE;_ylu=X3oDMTA2Z2szazkxBHNlYwN0bQ--"); // the HTTP is performed here String s = sb.getStrings (); How can I get rid of other text and get only the news content from this URL? The unwanted text(links) are like: 'Home', 'U.S.', etc appearing in the output. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |