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

Function xmlUnlinkNodeInternal

ThirdParty/libxml2/vtklibxml2/tree.c:3805–3828  ·  view source on GitHub ↗

* xmlUnlinkNodeInternal: * @cur: the node * * Unlink a node from its tree. * * This function only unlinks the node from the tree. It doesn't * clear references to DTD nodes. */

Source from the content-addressed store, hash-verified

3803 * clear references to DTD nodes.
3804 */
3805static void
3806xmlUnlinkNodeInternal(xmlNodePtr cur) {
3807 if (cur->parent != NULL) {
3808 xmlNodePtr parent;
3809 parent = cur->parent;
3810 if (cur->type == XML_ATTRIBUTE_NODE) {
3811 if (parent->properties == (xmlAttrPtr) cur)
3812 parent->properties = ((xmlAttrPtr) cur)->next;
3813 } else {
3814 if (parent->children == cur)
3815 parent->children = cur->next;
3816 if (parent->last == cur)
3817 parent->last = cur->prev;
3818 }
3819 cur->parent = NULL;
3820 }
3821
3822 if (cur->next != NULL)
3823 cur->next->prev = cur->prev;
3824 if (cur->prev != NULL)
3825 cur->prev->next = cur->next;
3826 cur->next = NULL;
3827 cur->prev = NULL;
3828}
3829
3830/**
3831 * xmlUnlinkNode:

Callers 12

xmlFreeDtdFunction · 0.85
xmlFreeDocFunction · 0.85
xmlInsertPropFunction · 0.85
xmlInsertNodeFunction · 0.85
xmlUnlinkNodeFunction · 0.85
xmlReplaceNodeFunction · 0.85
xmlDocSetRootElementFunction · 0.85
xmlTextMergeFunction · 0.85
xmlUnsetPropFunction · 0.85
xmlUnsetNsPropFunction · 0.85
xmlDOMWrapRemoveNodeFunction · 0.85
xmlDOMWrapAdoptNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected