Hi,
I am trying to write a scanner, but for some nodes I getting the
node.elementBegin() value as -1. I do not understand how my node could
begin from -1. I guess the lowest number possible is 2.1. Can anyone
tell me when this kind of output can be expected?
Dhaval
-----Original Message-----
From: Udani, Dhaval H.
Sent: Wednesday, December 18, 2002 3:38 PM
To: htmlparser-developer
Cc: Udani, Dhaval H.
Subject: [Htmlparser-developer] Registering Scanners
Hi all,
I had a certain design point to discuss out here. Many times we register
scanners of one tag during the scan() operation of another tag. An
example is registration of the HTMLOptionTagScanner during scan() of
HTMLSelectTagScanner.
This has an advantage of hierarchy of tags but it is not foolproof since
between tags a host of otehrtags can also be present.
Using the specific example mentioned above, a jsp tag or a commetn tag
could be present within the select tags apart from the option tag.
Hence I think it may be a good idea to just extract all the data from
between the 2 tags and let an application register more scanners and
work on this extracted data if he so requires. We should probably just
not get into that business coz a solution has the potential to be buggy.
This is specially so if I am trying to reproduce the tag as output. For
only parsing procedures I guess the hierarcy is useful but for
reproduction the solution has the tendency to be buggy.
I would like to know your views on the same.
Regards,
Dhaval Udani
Senior Analyst
M-Line, QPEG
OrbiTech Solutions Ltd.
+91-22-28290019 Extn. 1457
|