Stephen Collyer wrote:
David Bertoni wrote:
Stephen Collyer wrote:
Yes, that's the right call, but you've reversed what you need to do.
Your ContentHandler implementation should override setDocumentLocator()
and store that pointer.
Right. So the only thing that needs to happen in the overridden
method is the storing of the pointer that's passed in ?
Yes, that's it. In fact, that's what the documentation for the function
states:
* By default, do nothing. Application writers may override this
* method in a subclass if they wish to store the locator for use
* with other document events.
OK. Thanks for the help. BTW, is there any tutorial documentation
that explains the sort of stuff I've been asking - all I can
find that mentions this at all is the class level documentation,
and it's not entirely easy to see how it fits together from that.
A lot of this stuff is standard SAX behavior, so reading the SAX
documentation should help. Since we've implemented SAX in C++, there are
some differences, but it shouldn't be too hard to reconcile them:
http://www.saxproject.org
Dave