[Htmlparser-developer] Change request: TextExtractingVisitor
Brought to you by:
derrickoswald
From: Amol D. <Amo...@cc...> - 2004-08-19 16:23:15
|
Hi, IMO, the fields: private StringBuffer textAccumulator; private boolean preTagBeingProcessed; in file org.htmlparser.visitors.TextExtractingVisitor should be made protected or a protected accessors should be made available for these fields. That would make it easier to extend from TextExtractingVisitor. Currently extending from TextExtractingVisitor forces you to reimplement all the methods and redefine the private fields since the subclass methods cannot get the reference to the fields. On a related note, I have writen a simple adaptation of the TextExtractingVisitor for extracting strings from string nodes that match a particular regular expression. If deemed useful, it may be included in future distros. The file "RegexMatchingVisitor.java" is attached. Regards, ~ amol |