RE: [Htmlparser-developer] visitNode() [Was: HTMLParser 1.2 - 1.3]
Brought to you by:
derrickoswald
From: <dha...@or...> - 2003-05-16 05:12:12
|
> > 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? > Actually I thought that if a particular Tag is not registered via the Scanner then it will be parsed as just a Node (not of any specific type that is). But I guess its going to get parsed as a Tag then there is no problem. But I just wanted to know that what is the design consideration for not having visitNode() since Node is superclass of Tag. Dhaval |