ParseXML function has memory leak somewhere...