RE: [Htmlparser-developer] Label Tag
Brought to you by:
derrickoswald
From: <dha...@or...> - 2003-05-02 08:09:59
|
> Doesent sound good - maybe you can debug and tell me why.. (and hopefully > provide a fix to Derrick :). Well the Node [] returned by getChildrenAsNodeArray is a copy of the original children nodelist. I used the NodeList obtained from getChildren() and changed contents in that to get my work done. It worked!!! > You can remove the nodes you wish - NodeList has remove() in it. How about a removeAll(). Felt the need for that since I was replacing the entire child list with a single node. Will be useful for others also who want to change number of child nodes. At present I had to remove each one individually. Only advantage ofcourse is cleaner (not to mention easier) developer code. > Feel free to add methods that you think make it more intuitive for your > use - when we write a library, we really are doing a lot of guesswork about > what will be useful. Its only when a real user like you comes along that we > know for sure whats good and whats not. Well I am totally ga...ga over the CompositeTag class. Its introduction in 1.3 has made the parser so much more resilient and complete with parent...children....grandchildren...et al. Also ability to do things like getChildrenHTML() and perfect toHtml() methods are absolutely amazing. Now for the setLabel method of LabelTag. Considering all things(i.e. as much as my mind can think of), how about using a NodeList as a parameter? Developers can either use the orginal NodeList with some modifications or create an entirely new one and pass it to the method which in turn will effetively replace the childTags variable in CompositeTag. An overloaded String parameter based one can also be given with information related to its possible slow performance due to internal parsing. All this is only to shield users from inner-level code. Otherwise everything that is required to be done can get done but only after getting some knowledge over these mailing lists......thanx to somik and Derrick. Also can we have a no-args constructor for LabelScanner. I think I had sent these files to Somik for updation into CVS (alongwith SelectTag to use NodeList instead of List) Regards, Dhaval ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Htmlparser-developer mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlparser-developer |