Re: [Htmlparser-user] Getting all tags??
Brought to you by:
derrickoswald
From: Derrick O. <Der...@Ro...> - 2006-04-24 22:13:40
|
Sorry about that. I fixed the ocumentation. Just supply a null... NodeList list = parser.parse (null); Note that the tags will be nested so the list is only as long as the count of enclosing tags, usually just one, i.e. <HTML>. If you want nodes in a simple sequential order without nesting, use the lexer... Parser parser = new Parser ("http://whatever"); Lexer lexer = parser.getLexer (); Node node; while (null != (node = lexer.nextNode ()) ... do something with the node Thomas Zastrow wrote: > Dear list, > > I'm very new to the htmlparser and have some problems with the > documentation ... I need nothing else than a little program which > extracts *all* HTML-tags of a HTML-document. > > I took a look at the docs and find this example: > > Typical usage of the parser is: | | > > Parser parser = new Parser ("http://whatever"); > NodeList list = parser.parse (); > // do something with your list of nodes. > > But when I try to NodeList list = parser.parse(), it tells me that it > needs an "NodeFilter filter" as argument. But I don't need any > filterm, I want all tags in the doc ... how can I do this? > > Thank you very much for your labour! > > Best regards, > > Tom > > > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > |