Re: [xml] When to call xmlInitParser() ?
- From: Daniel Veillard <veillard redhat com>
- To: robert <robert xml 00008 org>
- Cc: "Henke, Markus" <Markus_Henke ordat com>, "'xml gnome org'" <xml gnome org>
- Subject: Re: [xml] When to call xmlInitParser() ?
- Date: Mon, 1 Oct 2001 06:00:53 -0400
On Mon, Oct 01, 2001 at 10:45:42AM +0200, robert wrote:
>> when i use libxml in a scenario where two or more different
>> parserContext are created during the runtime of the calling programm,
>> have i to call xmlInitParser() only once or for each parserContext?
>I'm just wondering if my question is either too thumb or too tough to
>take note of!? If first option fits, please forgive my ignorance and
>answer anyhow, i'll confess my shame if i should have hit on it on my
>own... 8)
Sorry about that, sometimes we're all a bit busy :)
To answer your question: you should only call xmlInitParser() once.
Actually it's not needed at all in most cases, the first time parsing is
done stuff is initialized when needed.
However, it doesn't hurt to call it multiple times (unless you are running
in a multi-threaded environment, which you don't :), it guards itself
against that.
Yes, unless you called xmlCleanupParser ()
This is explained in http://xmlsoft.org/xmlmem.html#cleanup
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]