Fixed xerces-c memory leaks