Clean up xmlelements for datasource