Re: [Htmlparser-developer] visitNode() [Was: HTMLParser 1.2 - 1.3]
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2003-05-16 02:12:55
|
Dhaval Udani wrote: > I thought that since Tag extends from Node, a visitNode() method would be > appropriate. Apart from that if I want to search for some tags that I have not > registered (say a <HTML> tag or a <HEAD> tag) I could use the visitNode > mechanism to do it. No - if you want to search for a "Tag" - you would use visitTag(). Everything is a Tag. An EndTag is a Tag. All Tags are nodes. A StringNode and RemarkNode are also nodes. What node is it that you wish to search for? > A similar argument can arise as to why have visitTag() at all when you have > specialized visitImageTag() and visitLinkTag() etc. We have visitTag() so that you can visit all tags - that are not links, or images (inclusive too, if you wish). Regards, Somik |