* xmlUnsetNsProp: * @node: the node * @ns: the namespace definition * @name: the attribute name * * Remove an attribute carried by a node. * Returns 0 if successful, -1 if not found */
| 6897 | * Returns 0 if successful, -1 if not found |
| 6898 | */ |
| 6899 | int |
| 6900 | xmlUnsetNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name) { |
| 6901 | xmlAttrPtr prop; |
| 6902 | |
| 6903 | prop = xmlGetPropNodeInternal(node, name, |
| 6904 | (ns != NULL) ? ns->href : NULL, 0); |
| 6905 | if (prop == NULL) |
| 6906 | return(-1); |
| 6907 | xmlUnlinkNodeInternal((xmlNodePtr) prop); |
| 6908 | xmlFreeProp(prop); |
| 6909 | return(0); |
| 6910 | } |
| 6911 | #endif |
| 6912 | |
| 6913 | #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) |
no test coverage detected