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

Function xmlUnlinkNode

ThirdParty/libxml2/vtklibxml2/tree.c:3839–3862  ·  view source on GitHub ↗

* xmlUnlinkNode: * @cur: the node * * Unlink a node from its tree. * * The node is not freed. Unless it is reinserted, it must be managed * manually and freed eventually by calling xmlFreeNode. */

Source from the content-addressed store, hash-verified

3837 * manually and freed eventually by calling xmlFreeNode.
3838 */
3839void
3840xmlUnlinkNode(xmlNodePtr cur) {
3841 if (cur == NULL)
3842 return;
3843
3844 if (cur->type == XML_NAMESPACE_DECL)
3845 return;
3846
3847 if (cur->type == XML_DTD_NODE) {
3848 xmlDocPtr doc = cur->doc;
3849
3850 if (doc != NULL) {
3851 if (doc->intSubset == (xmlDtdPtr) cur)
3852 doc->intSubset = NULL;
3853 if (doc->extSubset == (xmlDtdPtr) cur)
3854 doc->extSubset = NULL;
3855 }
3856 }
3857
3858 if (cur->type == XML_ENTITY_DECL)
3859 xmlRemoveEntity((xmlEntityPtr) cur);
3860
3861 xmlUnlinkNodeInternal(cur);
3862}
3863
3864#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
3865/**

Callers 15

parseAndPrintFileFunction · 0.85
xmlFreeElementFunction · 0.85
xmlFreeAttributeFunction · 0.85
xmlSAX2InternalSubsetFunction · 0.85
xmlSAX2StartElementFunction · 0.85
xmlSAX2StartElementNsFunction · 0.85
xmlTextReaderFreeDocFunction · 0.85
xmlTextReaderReadFunction · 0.85
xmlReplaceNodeFunction · 0.85
xmlSchemaCleanupDocFunction · 0.85
htmlSetMetaEncodingFunction · 0.85

Calls 2

xmlRemoveEntityFunction · 0.85
xmlUnlinkNodeInternalFunction · 0.85

Tested by

no test coverage detected