Refactoring XMLExtractor Method