Hi ,
I have a problem with entity resolver. I have made an
implementation of the saxParser and when the parsing
starts it doesn't go through the entityresolver
method.
I'm using the defaulthandler that implements it.

In constructor:

   SAX2XMLReader::ValSchemes valScheme =
SAX2XMLReader::Val_Auto;

    try {
        c_parser = XMLReaderFactory::createXMLReader();
    }
    catch (const XMLException& e) {
        std::cout << "Error during Sax2Xmlreader parsing:\n"
                  <<  Error(e.getMessage()) << "\n";
        exit(-1);
    }  
    c_parser->setErrorHandler(this);
    c_parser->setContentHandler(this);
    c_parser->setEntityResolver(this);


######
In xml.h

//this is never displayed why ?? 
InputSource * Xml::resolveEntity (const XMLCh *const
publicId, const XMLCh *const systemId)
{
    char *test = XMLString::transcode(systemId);
    std::cout << test << std::endl;
    exit(-1);
}

//this is displayed properly 
void Xml::startElement(const XMLCh* const uri, const
XMLCh* const localname, const XMLCh* const qname, 
const Attributes& attr)
{
  
  char *element = XMLString::transcode(localname);
  std::cout << element << std::endl;
 }




        

        
                
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! 
Messenger sur http://fr.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to