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

Function xmlAddNextSibling

ThirdParty/libxml2/vtklibxml2/tree.c:3189–3200  ·  view source on GitHub ↗

* xmlAddNextSibling: * @prev: the target node * @cur: the new node * * Unlinks @cur and inserts it as next sibling after @prev. * * Unlike xmlAddChild this function does not merge text nodes. * * If @cur is an attribute node, it is inserted after attribute * @prev. If the attribute list contains an attribute with a name * matching @cur, the old attribute is destroyed. * * See the not

Source from the content-addressed store, hash-verified

3187 * if arguments are invalid or a memory allocation failed.
3188 */
3189xmlNodePtr
3190xmlAddNextSibling(xmlNodePtr prev, xmlNodePtr cur) {
3191 if ((prev == NULL) || (prev->type == XML_NAMESPACE_DECL) ||
3192 (cur == NULL) || (cur->type == XML_NAMESPACE_DECL) ||
3193 (cur == prev))
3194 return(NULL);
3195
3196 if (cur == prev->next)
3197 return(cur);
3198
3199 return(xmlInsertNode(prev->doc, cur, prev->parent, prev, prev->next, 0));
3200}
3201
3202#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
3203 defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)

Callers 6

xmlXPtrBuildNodeListFunction · 0.85
xmlXIncludeCopyRangeFunction · 0.85
xmlXIncludeCopyXPointerFunction · 0.85
xmlXIncludeIncludeNodeFunction · 0.85
xmlRelaxNGCleanupTreeFunction · 0.85

Calls 1

xmlInsertNodeFunction · 0.85

Tested by

no test coverage detected