xml refactoring