/* Returns the new table or NULL in case of error.  */
xmlHashTablePtr xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f)
/* Returns the new table or NULL in case of error.  */
xmlHashTablePtr xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f)
{
	for(i = 0; i < table->size; i++) {
	    if (table->table[i].valid == 0)
		continue;
	    iter = &(table->table[i]);
	    while (iter) {
		next = iter->next;
		xmlHashAddEntry3(ret, iter->name, iter->name2,
			         iter->name3, f(iter->payload, iter->name));
		iter = next;
	    }
	}
    }
    ret->nbElems = table->nbElems;
    return(ret);
}