Re: How can I parse an XML file whose filesystem path is a Unicode string?

Nick Wellnhofer via xml <[email protected]> Tue, 2 Aug 2022 12:59:20 +0200
Newsgroups gmane.comp.gnome.lib.xml.general
Message-ID <[email protected]>
On 31/07/2022 17:40, Paul Kinnucan via xml wrote:
> My Xerces-c implementation uses a custom entity resolver to 
> resolve file entities. I might need a custom entity resolver to fix the 
> problem with the libxml2 implementation. However, libxml2 does not seem to 
> support custom entity resolvers. At lease, I have not been able to find this 
> feature in the doc or the libxml2 code base on GitHub.

You can install a custom entity loader with xmlSetExternalEntityLoader:

https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-parser.html#xmlSetExternalEntityLoader

Another option is to use "input callbacks":

https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-xmlIO.html#xmlRegisterInputCallbacks

Nick