* xmlRemoveID: * @doc: the document * @attr: the attribute * * Remove the given attribute from the ID table maintained internally. * * Returns -1 if the lookup failed and 0 otherwise */
| 2542 | * Returns -1 if the lookup failed and 0 otherwise |
| 2543 | */ |
| 2544 | int |
| 2545 | xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) { |
| 2546 | xmlIDTablePtr table; |
| 2547 | |
| 2548 | if (doc == NULL) return(-1); |
| 2549 | if ((attr == NULL) || (attr->id == NULL)) return(-1); |
| 2550 | |
| 2551 | table = (xmlIDTablePtr) doc->ids; |
| 2552 | if (table == NULL) |
| 2553 | return(-1); |
| 2554 | |
| 2555 | if (xmlHashRemoveEntry(table, attr->id->value, xmlFreeIDTableEntry) < 0) |
| 2556 | return(-1); |
| 2557 | |
| 2558 | return(0); |
| 2559 | } |
| 2560 | |
| 2561 | /** |
| 2562 | * xmlGetID: |
no test coverage detected