* xmlUnsetProp: * @node: the node * @name: the attribute name * * Remove an attribute carried by a node. * This handles only attributes in no namespace. * Returns 0 if successful, -1 if not found */
| 6876 | * Returns 0 if successful, -1 if not found |
| 6877 | */ |
| 6878 | int |
| 6879 | xmlUnsetProp(xmlNodePtr node, const xmlChar *name) { |
| 6880 | xmlAttrPtr prop; |
| 6881 | |
| 6882 | prop = xmlGetPropNodeInternal(node, name, NULL, 0); |
| 6883 | if (prop == NULL) |
| 6884 | return(-1); |
| 6885 | xmlUnlinkNodeInternal((xmlNodePtr) prop); |
| 6886 | xmlFreeProp(prop); |
| 6887 | return(0); |
| 6888 | } |
| 6889 | |
| 6890 | /** |
| 6891 | * xmlUnsetNsProp: |
no test coverage detected