Re: [Htmlparser-developer] toPlainTextString() feedback requested
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2002-12-24 03:37:22
|
Hi Sam, > Could you explain why you want to refactor these > methods? Remember the > danger of premature refactoring ... you lose > flexibility that then has > to be re-added later on, making more work in the > long run. There seems to be so much duplication in the parser, that it seems like Merciless_Refactoring can alone help clean the code. > Is there some efficiency reason why you want to > refactor these methods > or is it just for neatness? Readability and efficiency are important factors - far more important is to have a simple way of getting data from the parser. The idea is to pass in your own visitors into the parser, which could either extract text, or html. If you need to modify them, then you can modify these visitors to customize behaviour. The weight of the parser would reduce, code duplication would not be there, and it would be easier to customize. > Either way, I would certainly recommend a > deprecation step. Will keep that in mind. Cheers, Somik __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |