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

Function xmlCopyNamespace

ThirdParty/libxml2/vtklibxml2/tree.c:3943–3956  ·  view source on GitHub ↗

* xmlCopyNamespace: * @cur: the namespace * * Copy a namespace. * * Returns the copied namespace or NULL if a memory allocation * failed. */

Source from the content-addressed store, hash-verified

3941 * failed.
3942 */
3943xmlNsPtr
3944xmlCopyNamespace(xmlNsPtr cur) {
3945 xmlNsPtr ret;
3946
3947 if (cur == NULL) return(NULL);
3948 switch (cur->type) {
3949 case XML_LOCAL_NAMESPACE:
3950 ret = xmlNewNs(NULL, cur->href, cur->prefix);
3951 break;
3952 default:
3953 return(NULL);
3954 }
3955 return(ret);
3956}
3957
3958/**
3959 * xmlCopyNamespaceList:

Callers 1

xmlCopyNamespaceListFunction · 0.85

Calls 1

xmlNewNsFunction · 0.85

Tested by

no test coverage detected