getCategoriesFromXml the way it initially was