[xml] How to add a DTD to a document
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: xml gnome org
- Subject: [xml] How to add a DTD to a document
- Date: Sun, 9 Mar 2014 14:33:34 +0100
I can’t find out how to add a DTD (internal subset) to a document without poking into libxml2’s internal data
structures. The obvious approach is to add a xmlDtdPtr using
xmlAddPrevSibling on the document root. But this will cause a memory leak because xmlFreeDoc won’t free the
DTD nodes. It only frees the DTDs pointed to by doc->intSubset and doc->extSubset. So do I have to deal with
these struct members manually or is there a better way?
Nick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]