Re: [xml] resolveEntity and SAX



On Fri, Nov 16, 2012 at 06:01:45PM +0800, Roland King wrote:
Thanks very much for that - I've spent the afternoon looking at the
source and examples and your mail beautifully fills in the gaps.

  good

My code is SAX but it's going to be easier to turn it around and make
it use the Reader API than it is to try and make SAX and entities work. I
thought that I couldn't use the reader because there was no way to give
it an external entity loading callback (no access to the xmlParserCtxt or
the sax callbacks), but I just found the global SetExternalEntityLoader()
function which I expect will let me hook in to provide the parser with
the DTD. I'm going to try that, see how well I get on.

  As long as you do this in a program and not in a library
yes that's just fine ! The reader is also really a nicer
model to program against:

  http://xmlsoft.org/xmlreader.html

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/



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