"Re: [xml] Initialization"



Hi,

on 4/28/2004 9:44 AM Ohad Oded wrote:

Hi, 

 

I'm experiencing an access violation.

When working with xmlParseFile() everything is ok.

However when working with xmlReaderForMemory() I have an access
violation because xmlInitParser() wasn't called.

Is this intentional (meaning I have to call it myself)? 

Yes, "xmlInitParser" needs to be called to initialize the library; this 
function is reentrant, so don't care how often you call it. Some libxml2 
functions call "xmlInitParser", so you were just lucky in the case of 
"xmlParseFile". Note that it initializes the library only, it is not 
designated to be called before parsing (its name is a bit misleading). 
Additionally, "xmlCleanupParser" needs to be called to finalize the library.


Regards,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]