[Expat-discuss] Text data handler

Greg Martin Greg.Martin at TELUS.COM
Fri May 21 18:47:17 EDT 2004



> -----Original Message-----
> From: Shen, Lin [mailto:lshen at cisco.com]
> Sent: Friday, May 21, 2004 4:34 PM
> To: Greg Martin; expat-discuss at libexpat.org
> Subject: RE: [Expat-discuss] Text data handler
> 
> 
> What's the difference between resetting a parser and destroying and
> re-creating a parser for parsing a different document? I guess it's
> mainly performance. Will a parser context be lost when it's reset? 
> 

It reduces memory allocation. According to the header file: all handlers 
are cleared from the parser, except for the unknownEncodingHandler. The 
parser's external state is re-initialized except for the values of ns and 
ns_triplets.

 




More information about the Expat-discuss mailing list