How to validate xml using dtd file from the memory using libxm2

I am not sure if this is the right place to ask my question. I have dtd file as a gresource. I can generate a null-terminated string using the GFile interface and construct xmlDoctPtr using xmlParseMemory API. Now, I am stuck with a problem. How to make xmlDtdPtr out of xmlDocPtr? The complication here is that my dtd file contains ENTITY which includes another dtd file. This file is also greasource file. I was thinking if we can substitute the Entity somehow with a string but I don’t how to do this. The goal here is to validate an XML file which will be provided by user but dtd should be loaded with the program. I appreciate any help.

You likely want to ask on the libxml2 mailing list: xml Info Page

ok, thanks. Just submitted the email.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.