Re: [xml] setting externelEntityResolver on a per-context basis

On Mon, Jul 02, 2007 at 12:11:53PM +0200, Lars Oppermann wrote:
Hi All,

Is it currently possible in libxml2 to set the external entity resolver 
for an single xmlParserCtxt instead of using 
xmlSetExternalEntityLoader() which seems to be setting it globally?

  I don't think it's possible, look at the struct _xmlParserCtxt there
is no way to plug a resolver there.

I have tried setting ctxt->sax->resolveEntity to my resolve function, 
but that isn't getting used when I use xmlCtxtReadFile() with that context.

  Why are you using xmlCtxtReadFile() when obviously you loose the
control while there are function working for example from a file descriptor ?


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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