* xmlCopyNamespace: * @cur: the namespace * * Copy a namespace. * * Returns the copied namespace or NULL if a memory allocation * failed. */
| 3941 | * failed. |
| 3942 | */ |
| 3943 | xmlNsPtr |
| 3944 | xmlCopyNamespace(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: |
no test coverage detected