[Expat-discuss] reuse of an XML_Parser across documents

Debajit Ghosh debajit_ghosh@yahoo.com
Thu, 15 Mar 2001 12:15:12 -0800 (PST)


hi there,

newbie question -- is it possible to reuse an instance
of an XML_Parser for parsing more than one XML
document?  i'm able to parse everything just fine for
the first document, set isFinal to 1 for my last call,
etc, but when i try to continue parsing, i get the
following error immediately: 

junk after document element

this suggests that the parser thinks it's continuing
to parse the previous document (depending on whether
or not i am parsing via XML_Parse or XML_ParseBuffer,
the line numbers may also continue from the last
file).

i'm currently using expat v1.2, but a skim of the
v1.95 bugs/patches/etc listings did not reveal
anything that seemed pertinent.  out of curiousity, is
there anything that describes the exact
developer-visible changes between the v1.2 handoff and
SourceForge's v1.95?

another question -- if i want expat to validate a
document according to the DTD it specifies, do you
have to do more than just compile with -DXML_DTD and
call
XML_SetParamEntityParsing(XML_PARAM_ENTITY_PARSING_{ALWAYS,UNLESS_STANDALONE})?

thanks very much for your time,

jit


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/