Re: [xml] Reusing xmlTextReader and BOM



On Fri, Jun 26, 2009 at 10:26:50PM +0200, Cornelius Hald wrote:
Hi again!

Does no one have an idea? I'm now always creating/destroying a xmlReader
for every file that I parse. The thing is that I have to parse many
small files after each other, so I think it would really make a
difference if I could reuse the xmlReader.

Any hints are still highly appreciated!

  This could be a parser bug about some problem when resetting the
parser state for the new document. Unfortunately xmlReaderNewFile()
is not exercized by xmllint so reproducing the problem gets a bit
harder...
  That said the time needed to create a newcontext while not zero
is probably neglectible compared to I/Os needed to feed the parser
but I may be wrong, depends really on your use case.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]