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

Function xmlAddPrevSibling

ThirdParty/libxml2/vtklibxml2/tree.c:3222–3233  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

3220 * if arguments are invalid or a memory allocation failed.
3221 */
3222xmlNodePtr
3223xmlAddPrevSibling(xmlNodePtr next, xmlNodePtr cur) {
3224 if ((next == NULL) || (next->type == XML_NAMESPACE_DECL) ||
3225 (cur == NULL) || (cur->type == XML_NAMESPACE_DECL) ||
3226 (cur == next))
3227 return(NULL);
3228
3229 if (cur == next->prev)
3230 return(cur);
3231
3232 return(xmlInsertNode(next->doc, cur, next->parent, next->prev, next, 0));
3233}
3234#endif /* LIBXML_TREE_ENABLED */
3235
3236/**

Callers 3

htmlSetMetaEncodingFunction · 0.85
xmlXIncludeIncludeNodeFunction · 0.85
xmlRelaxNGCleanupTreeFunction · 0.85

Calls 1

xmlInsertNodeFunction · 0.85

Tested by

no test coverage detected