[xml] How to validate xml using dtd file from the memory



Hi,

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 know 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.



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