Mirko,
Please see if FAQ http://xml.apache.org/xerces-c/faq-build.html#faq-13
helps.
Tinny
----- Original Message -----
From: "Beatrice Mirko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 04, 2003 4:12 AM
Subject: XercesDOMParser and
> Hello,
>
> I am using XercesDOMParser to parse xml data stored as string in a
> char-array. After the call
> MyParser->parse(*memBufIS);
> I get a lot of these messages
> "First-chance exception in XmlConvTest.exe (KERNEL32.DLL):
0xE06D7363:
> Microsoft C++ Exception."
> in the debug windows of VisualStudio 6.
> The parser works correctly and returns without errors.
> Have I forgot something ?
> Thanks in advance.
> Mirko
>
>
> My code looks like this:
>
> char Template[]="<?xml version='1.0' encoding='UTF-8'?> ...";
>
>
>
> const char *XMLdoc = Template;
> unsigned int DocLen = strlen(Template);
>
> // Init DOM Parser
> DOMImplementation *impl =
> DOMImplementationRegistry::getDOMImplementation(NULL);
> XercesDOMParser *MyParser = new XercesDOMParser;
> DOMWriter *theSerializer =
> ((DOMImplementationLS*)impl)->createDOMWriter();
>
> // And install error handler
> MyErrorHandler = new MyDOMErrorHandler;
> MyParser->setErrorHandler(MyErrorHandler);
>
> XercesDOMParser::ValSchemes ValScheme;
> ValScheme = XercesDOMParser::Val_Auto;
>
> bool doNamespaces = true;
> bool doSchema = true;
> bool schemaFullChecking = true;
>
> MyParser->setDoNamespaces(doNamespaces);
> MyParser->setDoSchema(doSchema);
> MyParser->setValidationSchemaFullChecking(schemaFullChecking);
> MyParser->setValidationScheme(ValScheme);
>
> MemBufInputSource *memBufIS = new MemBufInputSource( (const XMLByte*)
> XMLdoc, DocLen, (const char*) NULL, false );
>
> try
> {
> MyParser->resetDocumentPool();
>
> MyParser->parse(*memBufIS);
>
> MyDocument = MyParser->getDocument();
>
> MyRootElement = MyDocument->getDocumentElement();
>
> delete memBufIS;
> }
> catch ...
>
>
> ---------------------------------------------------------------------
> 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]