Re: [Htmlparser-developer] Request for comments: Proposal for changes in HTMLParser API
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2003-01-08 05:44:53
|
Hi Holger, >Finally you would get the results with: >- java.util.List getResultList() that returns a List containing HTMLNode objects >Returning simply a List is good in my opinion since this integrates the HTMLParser nicely into the standard Java collections >framework. It also makes it future save for the later applicability of Generics found in Java 1.5. This is a good suggestion. But, the drawback of this approach is that we have to keep casting to the objects we want. I feel there is a significant performance improvement to be had, by creating our own "list" object. You will find HTMLVector already in the source - but not yet integrated with the code (that requires a bit of work), which addresses this issue. Would you like to take that up ? >The solution for retrieving results with getResultXXX() methods would also allow to simply add some more and different result >retriever methods, e.g. >- org.htmlparser.util.HTMLEnumeration getResultHTMLEnumeration() or >- org.htmlparser.util.HTMLTree getResultHTMLTree() that would retrieve an (to be programmed) HTMLTree (similar to a w3c >Document) Getting the results from the parser is a very important area, and we've been adding some visitors which we've found very useful. HTMLTree sounds really interesting. It would be nice if you can also check out the existing visitors. Regards, Somik ******************************************** Somik Raha Extreme Programmer and Coach Industrial Logic, Inc. so...@in... http://industriallogic.com Voice : 510-540-8336 Fax : 510-540-8936 ******************************************** Periodic reassessment means looking at things which are taken for granted, things which seem beyond doubt. Periodic reassessment means challenging all assumptions. It is not a matter of reassessing something because there is a need to reassess it; there may be no need at all. It is a matter of reassessing something simply because it is there and has not been assessed for a long time. It is a deliberate and quite unjustified attempt to look at things in a new way. --- Edward De Bono in Lateral Thinking, Chapter 5, The Use of Lateral Thinking |