MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlRemoveEntity

Function xmlRemoveEntity

ThirdParty/libxml2/vtklibxml2/tree.c:2696–2728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2694}
2695
2696static void
2697xmlRemoveEntity(xmlEntityPtr ent) {
2698 xmlDocPtr doc = ent->doc;
2699 xmlDtdPtr intSubset, extSubset;
2700
2701 if (doc == NULL)
2702 return;
2703 intSubset = doc->intSubset;
2704 extSubset = doc->extSubset;
2705
2706 if ((ent->etype == XML_INTERNAL_GENERAL_ENTITY) ||
2707 (ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
2708 (ent->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY)) {
2709 if (intSubset != NULL) {
2710 if (xmlHashLookup(intSubset->entities, ent->name) == ent)
2711 xmlHashRemoveEntry(intSubset->entities, ent->name, NULL);
2712 }
2713 if (extSubset != NULL) {
2714 if (xmlHashLookup(extSubset->entities, ent->name) == ent)
2715 xmlHashRemoveEntry(extSubset->entities, ent->name, NULL);
2716 }
2717 } else if ((ent->etype == XML_INTERNAL_PARAMETER_ENTITY) ||
2718 (ent->etype == XML_EXTERNAL_PARAMETER_ENTITY)) {
2719 if (intSubset != NULL) {
2720 if (xmlHashLookup(intSubset->pentities, ent->name) == ent)
2721 xmlHashRemoveEntry(intSubset->entities, ent->name, NULL);
2722 }
2723 if (extSubset != NULL) {
2724 if (xmlHashLookup(extSubset->pentities, ent->name) == ent)
2725 xmlHashRemoveEntry(extSubset->entities, ent->name, NULL);
2726 }
2727 }
2728}
2729
2730static int
2731xmlNodeSetDoc(xmlNodePtr node, xmlDocPtr doc) {

Callers 2

xmlNodeSetDocFunction · 0.85
xmlUnlinkNodeFunction · 0.85

Calls 2

xmlHashLookupFunction · 0.85
xmlHashRemoveEntryFunction · 0.85

Tested by

no test coverage detected