There isn't a way to do this in the API. You'll have to use a double reference and register the entityresolver into the parser and the parser into the entityresolver. Which of course frells up the possibility of using reentrant entityresolvers, which can be connected to several parsers at a given time.
Regards Erik Rydgren Mandarinen systems AB Sweden -----Original Message----- From: Shirish Kulkarni [mailto:[EMAIL PROTECTED] Sent: den 19 mars 2003 08:48 To: [EMAIL PROTECTED] Subject: To access DOMParser object from EntityReolver Hi, The xerces DOMParser is observed to be crashing ( as a known bug http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8011 ) if specified Schema file is missing. To avoid this, I am having the following proposal + if the file to be opened is found to be missing + then disable the schema / namespace validation for the parser This will be implemented within resolveEntity() callback. Following is the code snippet. LocalFileInputSource * local_file_input_source = new LocalFileInputSource(path_dom_string.rawBuffer()); BinFileInputStream binary_file_input_steam = local_file_input_source->makeStream(); bool is_open = binary_file_input_steam.getIsOpen(); if ( is_open == false ) { /* ValSchemes gValScheme = Val_Never; bool gDoNamespaces = false; bool gDoSchema = false; setValidationScheme(gValScheme); setDoNamespaces(gDoNamespaces); setDoSchema(gDoSchema); */ } I am not sure, how to access the parser object from which resolveEntity callback has got initiated. I searched all the public APIs / DOMParser.hpp / HandlerBase.hpp, but there seems to be no direct way. Please suggest some work-around. With best regards, Shirish __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]