I have initialised the library, but now I know what the error is after 4-hour-pondering:

I supply string literals without whitespaces like
3       XMLCh* docName = XMLString::transcode("XMLSample");
4       DOMDocument* xmlDoc = impl->createDocument(0, docName, 0);

and voila. It works...:P

thanks a lot for the fast reply,
cath











Gareth Reakes <[EMAIL PROTECTED]>

2003-01-16 11:12 AM
Please respond to xerces-c-dev

       
        To:        [EMAIL PROTECTED]
        cc:        (bcc: Catharina Ibrahim/EHV/TASS/PHILIPS)
        Subject:        Re: error performing DOMImplementation::createDocument

        Classification:        




Hi,

                Have you initialised the library? Something like

   try
   {
       XMLPlatformUtils::Initialize();
   }

   catch(const XMLException &toCatch)
   {
       cerr << "Error during Xerces-c Initialization.\n"
            << "  Exception message:"
            << StrX(toCatch.getMessage()) << endl;
       return 1;
   }



take a look at the samples.


Gareth




On Thu, 16 Jan 2003 [EMAIL PROTECTED] wrote:

> Hi, I try to create an XML DOM tree by writing these in msDev Visual C++
> 6:
>
> 1       XMLCh* feature = XMLString::transcode("Core");
> 2       DOMImplementation* impl =
> DOMImplementationRegistry::getDOMImplementation(feature);
> 3       XMLCh* docName = XMLString::transcode("XML Document Sample");
> 4       DOMDocument* xmlDoc = impl->createDocument(0, docName, 0);
>
> Visual C++ gives me this error message when it comes to the 4th line:
> First-chance exception in GenericAppl.exe (KERNEL32.DLL): 0xE06D7363:
> Microsoft C++ Exception
>
> could someone pls tell me what goes wrong. I am new to both c++ and xerces
> and I really am lost...
>
> is it something to do with .DLL? I use the binary distribution and I
> assume it is enough to link to the .lib. Is that correct?
>
> thx a lot,
> cath

--
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




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



Reply via email to