refactor xml config loaders