Re: [Htmlparser-developer] parsing error of a html page
Brought to you by:
derrickoswald
From: Derrick O. <Der...@ro...> - 2003-04-09 21:59:23
|
Ling, The StringExtractor gets every StringNode. If you don't want the comments (script) try this: #import org.htmlparser.beans.StringBean; public class TryBeans { public static void main (String[] args) { StringBean sb = new StringBean (); sb.setURL ("http://www.cnnfn.com/2001/11/29/companies/enron/"); System.out.println (sb.getStrings ()); } } See http://htmlparser.sourceforge.net/docs/index.php/JavaBeans for more details. Derrick Mr LING MA wrote: >When I try to use htmlparser stringextractor on page: > >http://www.cnnfn.com/2001/11/29/companies/enron/ > >the comment tags below is also outputted. Can this >be an error of style tag or comment tag? > >Thanks > >Ling Ma > >OUTPUT after extracted tag: ><!-- >adSetTarget('_top'); >htmlAdWH( (new ><snip> > > |