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

Function xmlSetListDoc

ThirdParty/libxml2/vtklibxml2/tree.c:2925–2943  ·  view source on GitHub ↗

* xmlSetListDoc: * @list: a node list * @doc: new document * * Associate all subtrees in @list with a new document. * * Internal function, see xmlSetTreeDoc. * * Returns 0 on success. If a memory allocation fails, returns -1. * All subtrees will be updated on failure but some strings * may be lost. */

Source from the content-addressed store, hash-verified

2923 * may be lost.
2924 */
2925int
2926xmlSetListDoc(xmlNodePtr list, xmlDocPtr doc) {
2927 xmlNodePtr cur;
2928 int ret = 0;
2929
2930 if ((list == NULL) || (list->type == XML_NAMESPACE_DECL))
2931 return(0);
2932
2933 cur = list;
2934 while (cur != NULL) {
2935 if (cur->doc != doc) {
2936 if (xmlSetTreeDoc(cur, doc) < 0)
2937 ret = -1;
2938 }
2939 cur = cur->next;
2940 }
2941
2942 return(ret);
2943}
2944
2945#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
2946/**

Callers 1

xmlSetTreeDocFunction · 0.85

Calls 1

xmlSetTreeDocFunction · 0.85

Tested by

no test coverage detected