On 06/11/2011 01:13 PM, David Kubicek wrote:
On 06/11/2011 05:58 AM, Liam R E Quin wrote:
One way might be to override the entity resolver.

Never mind. I found an open source app that uses the external entity loader and learned from there how to setup a custom global context.

The rest I already had in place (custom function xmlNewInputFromMem(), etc.) started working after this.


Perhaps one more question. This is going to be hard to find for me. Now, with every document I parse, a new context is created before and freed after "xmlParseDocument(ctx)".

Also, my external loader is called for every document, every time creating a new xmlParserInput for the same DTD. Using Valgrind, I can see that without repeatedly creating xmlParserInput, the app only eats about 7MB of heap after processing all documents. When I enable the external loader, it consumes over 57MB and runs visibly slower (it's a weak HW).

How do I make this work without repeating the xmlParserInput allocation for every document (every external entity loader invocation)?

Thanks,

--
David Kubicek

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to