creates xml structure based on a configuration