[SoapRMI] xpp potential cleanup/reset problem
Aleksander Slominski
aslom_at_cs.indiana.edu
Fri, 26 Jul 2002 20:26:39 -0400
"CHEN,SHIH-CHANG (HP-NewJersey,ex2)" wrote:
> If I create a parser for each request, this problem goes away,
> but performance degrades a little bit (3%). From the javadoc,
> I learned that xpp parser should be reusable. Whenever we set
> a new source to the parser, it also resets the parser. Do I need
> to do any thing for that ?
hi,
this can happen if you try to call next*() after end of XML input is reached:
you are past last end tag and end of stream was reached so parser is in
END_DOCUMENT state (you can check it by calling getEventType()).
to reuse parser instance for new input call setInput() and parser will be
set to initial state (START_DOCUMENT).
let me know if you still experience problems.
thanks,
alek