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]