I am trying the following piece of code

    XMLPlatformUtils::Initialize();
    SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();

    parser->loadGrammar("d:\\datacenter\\xml\\Storeinfo.dtd",
Grammar::DTDGrammarType, true);
    parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
    parser->setFeature(XMLUni::fgXercesUseCachedGrammarInParse, true);
    parser->setFeature(XMLUni::fgXercesCacheGrammarFromParse, true);

    parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
    parser->setFeature(XMLUni::fgXercesSchema, true);
    parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
    parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, true);
    parser->setFeature(XMLUni::fgSAX2CoreValidation, true);
    parser->setFeature(XMLUni::fgXercesDynamic, true);

    parser->parse("d:\\datacenter\\xml\\Storeinfo.xml");
    XMLPlatformUtils::UnInitialize();

First even though I load the DTD, parse does not seem to find it. In the
code in 
in IGXMLScanner (line 1303)
   Grammar* grammar = fGrammarResolver->getGrammar(sysIdSrc->getSystemId());
always returns NULL.

After that, the parser crashes while doing a scanDocTypeDecl.

Here are the enclosed files. Please copy them to a directory other than the
directory where the exe is present.
Can someone please explain what is wrong.

Thanks
Kiran



 

Attachment: StoreInfo.dtd
Description: Binary data

Attachment: StoreInfo.xml
Description: Binary data

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

Reply via email to