Fix xml.c memleak + doc: fix typos in index terms