Hello,
I have two questions related to scanners:
A: In JavaDoc of TagScanner is the sentence "When asked to scan the tag, this class does nothing other than perform the tag's semantic action." What is meant by "... tag's semantic action? When I run a TagScanner.scan on a <DIV> tag, I don't see anything "performed". It simply returns the same structure as the provided <DIV> tag.
B: When I feed the same <DIV> tag (which includes other tags, hence according to my understanding is a composite tag) into a CompositeTagScanner I'm getting a NullPointerException. What is the required input for a CompositeTagScanner scan?
Maybe you have a sample code that demonstrates the correct usage of CompositeTagScanner?
Thanks
Juergen
It's been a while, but I'll try.
There are only two tags with built in semantic action, I think... <BASE>
and <META>, one sets the base URL and the other checks for an encoding
specification and switches encoding. The rest is up to you... it's just a
hook.
Here is an example of it being used (trivially)...
http://htmlparser.sourceforge.net/javadoc/index.html
NullPointerExceptions can happen for a number of reasons, without a stack
trace it would be difficult to answer that question. The scanner classes
are mostly for internal use. If you are creating a new tag (i.e. JSP tags),
you might need to know about scanners.
Normally you would use the Parser class to parse a <DIV> tag ....
http://htmlparser.sourceforge.net/javadoc/index.html
Derrick
On Tue, Oct 28, 2014 at 2:49 PM, Juergen juergen100@users.sf.net wrote:
Related
Support Requests: #79