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

Function xmlXPathNodeSetRemove

ThirdParty/libxml2/vtklibxml2/xpath.c:3276–3287  ·  view source on GitHub ↗

* xmlXPathNodeSetRemove: * @cur: the initial node set * @val: the index to remove * * Removes an entry from an existing NodeSet list. */

Source from the content-addressed store, hash-verified

3274 * Removes an entry from an existing NodeSet list.
3275 */
3276void
3277xmlXPathNodeSetRemove(xmlNodeSetPtr cur, int val) {
3278 if (cur == NULL) return;
3279 if (val >= cur->nodeNr) return;
3280 if ((cur->nodeTab[val] != NULL) &&
3281 (cur->nodeTab[val]->type == XML_NAMESPACE_DECL))
3282 xmlXPathNodeSetFreeNs((xmlNsPtr) cur->nodeTab[val]);
3283 cur->nodeNr--;
3284 for (;val < cur->nodeNr;val++)
3285 cur->nodeTab[val] = cur->nodeTab[val + 1];
3286 cur->nodeTab[cur->nodeNr] = NULL;
3287}
3288
3289/**
3290 * xmlXPathFreeNodeSet:

Callers

nothing calls this directly

Calls 1

xmlXPathNodeSetFreeNsFunction · 0.85

Tested by

no test coverage detected