[xml] Deleting unused internal entities
- From: Dustin Voss <d_j_v mac com>
- To: xml gnome org
- Subject: [xml] Deleting unused internal entities
- Date: Wed, 23 Dec 2009 17:04:16 -0800
Hello. I am creating a tree with a number of internal entity definitions and I am using the XML_PARSE_NOENT
option. The resulting document has an internal subset that defines these entities, but they are never used in
the actual document.
What's the best way to remove those unnecessary definitions? I do not want to remove the entire internal
subset, because there may be external entities defined there.
Is it enough to delete nodes from xmlDoc->intSubset->children, or do I have to remove the entities from the
xmlDoc->intSubset->entities hash table as well? Will xmlDoc->intSubset->next have anything of interest?
To delete nodes, I don't see an xmlDeleteNode function, but I do see xmlReplaceNode. Can I pass in NULL for
the "cur" parameter?
To access the entity hash table, can I just cast xmlDoc->intSubset->entities to xmlHashTablePtr and call
xmlHashRemoveEntry? What should I pass for the "f" parameter?
Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]