I’m successfully using XMLReader to parse lots of xml documents. I’m now trying to tweak my program to persist the XMLReader in a static variable for reuse rather than disposing and creating a new one for each document. My problem is that once I call XmlReader.Reset and then attempt to parse another document with it, none of the / event handlers will fire. I do see the CurrentByteIndex increment which indicates that expat did actually read through the document, it just didn’t fire any event handlers.
I noticed the following in the documentation for XML_ParserReset() on the Expat website: “All handlers are cleared from the parser, except for the unknownEncodingHandler”. Perhaps the Xojo library is not reconnecting the event handlers to the parser instance after the reset?
Any thoughts?