Another problem:
One more thing that I noticed:
At the base level Parser.elements() gives me a list of all the first-level
nodes. Using any of the first level nodes I may obtain its next-level children
using CompositeTag.getChildren(). This being a NodeList I can easily add new
elements(nodes, tags etc) here. However I cannot add the same at the first
level.
Can anything be done about it?
Regards,
Dhaval Udani
Senior Analyst
M-Line, QPEG
OrbiTech Solutions Ltd.
+91-22-28290019 Extn. 1457
> -----Original Message-----
> From: Udani, Dhaval H.
> Sent: Wednesday, May 14, 2003 7:45 PM
> To: htmlparser-developer
> Cc: Udani, Dhaval H.
> Subject: [Htmlparser-developer] SimpleNodeIteraotr
>
>
> Hi,
>
> Since SimpleNodeIterator is basically the same as
> NodeIterator, I think it
> should just extend NodeIterator and redefine the methods
> without throwing the
> exceptions. Either that way or make NodeIterator extend
> SimpleNodeIterator. I
> think its better design and leads to more uniform code.
>
> Secondly, some anomalies that I noted. Not really serious but
> just from a more
> consistent viewpoint.
>
> Parser.elements() returns a NodeIterator
>
> while CompositeTag.getChildren() returns a NodeList.
>
> Ideally since both are returning the nodes, a common
> mechanism should be used.
>
> Also NodeList.elements() returns a SimpleNodeIterator. This
> should also be
> synchronized with the above so that one common class is returned.
>
> This is pretty typical of Java classes : Vector has add()
> method and Hashtable
> has put() method clearly showing that both were written
> separately. There are
> many more such examples actually. We should try and avoid it.
>
> Dhaval
>
>
>
> -------------------------------------------------------
> Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> The only event dedicated to issues related to Linux
> enterprise solutions
> www.enterpriselinuxforum.com
>
> _______________________________________________
> Htmlparser-developer mailing list
> Htm...@li...
> https://lists.sourceforge.net/lists/listinfo/htmlparser-developer
>
|