Re: [xml] Parsing multiple documents with SAX - event handlers not triggered for subsequent docs
- From: Rachael Churchill <rachael churchill linguamatics com>
- Cc: xml gnome org
- Subject: Re: [xml] Parsing multiple documents with SAX - event handlers not triggered for subsequent docs
- Date: Mon, 02 Feb 2009 14:19:03 +0000
Rachael Churchill wrote:
...or xmlCtxtResetPush? If so, what are the other arguments to that
function supposed to be?
Daniel Veillard wrote:
Thanks. That wasn't clear from the documentation. Which is "the
adequate function"? Is it xmlCtxtReset? I already tried that, but then
I get error 5 (end of document) when parsing the second document.
On Fri, Jan 30, 2009 at 01:51:38PM +0000, Rachael Churchill wrote:
I'm having trouble parsing more than one document with the SAX
interface. I can parse the first one fine, using xmlParseChunk, and
set terminate=1 to indicate that this is the final chunk from that
document, and xmlParseChunk returns success. Then I try to parse a
second document, and none of the event handlers are triggered for
that document, but xmlParseChunk still returns success for that
Do I need to do something else, as well as setting terminate=1, to
indicate the end of the first document?
a Parser context can be used only for one document ... unless you
reset it with the adequate funtion between 2 parsing.
xml mailing list, project page http://xmlsoft.org/
xml gnome org
Is there a documentation page anywhere describing typical workflow?
(e.g. "first you set up the handlers, then you call xmlParseChunk for
each chunk you want to parse; you can only parse one document this way,
so if you want to parse another one you need to call such-and-such
between each document...")
] [Thread Prev