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

Function xmlXPathNodeSetFreeNs

ThirdParty/libxml2/vtklibxml2/xpath.c:2746–2758  ·  view source on GitHub ↗

* xmlXPathNodeSetFreeNs: * @ns: the XPath namespace node found in a nodeset. * * Namespace nodes in libxml don't match the XPath semantic. In a node set * the namespace nodes are duplicated and the next pointer is set to the * parent node in the XPath semantic. Check if such a node needs to be freed */

Source from the content-addressed store, hash-verified

2744 * parent node in the XPath semantic. Check if such a node needs to be freed
2745 */
2746void
2747xmlXPathNodeSetFreeNs(xmlNsPtr ns) {
2748 if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL))
2749 return;
2750
2751 if ((ns->next != NULL) && (ns->next->type != XML_NAMESPACE_DECL)) {
2752 if (ns->href != NULL)
2753 xmlFree((xmlChar *)ns->href);
2754 if (ns->prefix != NULL)
2755 xmlFree((xmlChar *)ns->prefix);
2756 xmlFree(ns);
2757 }
2758}
2759
2760/**
2761 * xmlXPathNodeSetCreate:

Callers 8

xmlXPathNodeSetDelFunction · 0.85
xmlXPathNodeSetRemoveFunction · 0.85
xmlXPathFreeNodeSetFunction · 0.85
xmlXPathNodeSetKeepLastFunction · 0.85
xmlXPathReleaseObjectFunction · 0.85
xmlXPathNodeSetFilterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected