setDocumentLocator is declared in DocuemntHandler as
virtual void setDocumentLocator(const Locator *const locator)
my understanding of this function is that by saving a reference to the
Locator later methods can query that locater to get line numbers (and
other things Locator can provide). In return we have to be careful not
to alter or delete the Locator.
In java this method is declared as
void setDocumentLocator(Locator locator)
and examples found online do things such as
public void setDocumentLocator(Locator locator) {
this.locator = locator;
}
(and then presumably using this.locator in later callbacks)
The catch is because the c++ declares the argument as a const Locator
*const such an assignment is impossible [without a cast].
http://xerces.apache.org/xerces-c/apiDocs/classDocumentHandler.html
http://xerces.apache.org/xerces-c/apiDocs/classLocator.html
http://xerces.apache.org/xerces-j/apiDocs/org/xml/sax/DocumentHandler.html
http://www.cafeconleche.org/books/xmljava/chapters/ch06s12.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]