Cleanup XML namespaces in specified order