Hi Alberto, your statement was a great help. Thank you very much.
Mirko -----Ursprüngliche Nachricht----- Von: Alberto Massari [mailto:[EMAIL PROTECTED] Gesendet: Montag, 1. November 2004 11:09 An: [EMAIL PROTECTED] Betreff: Re: DOMBuilder and DOMEntityResolver (with another address) At 08.27 29/10/2004 +0200, Mirko Braun wrote: >Hi to all, > >i want to use the DOMEntityResolver to use an external Schema because >the >Schema >is not in the same directory as the xml file. >I think i have to overwrite the resolveentity() method of the >DOMEntityResolver but >i'm not quite sure how to do this. I think i have to use the >DOMInputSource too. > >Can anybody help me? Yes, you have to define a class derived from DOMEntityResolver, implement the resolveEntity() method, then pass the pointer to an instance of this class to the DOMBuilder::setEntityResolver method. The code in the entity resolver should be something like this: MyEntityResolver::resolveEntity(const XMLCh* const publicId , const XMLCh* const systemId , const XMLCh* const baseURI) { if( *test for publicId and/or systemId* ) { LocalFileInputSource* is=new LocalFileInputSource(NULL, "c:\\reals_schema.xsd"); return new Wrapper4InputSource(is); } return NULL; } Hope this helps, Alberto --------------------------------------------------------------------- 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]