XML parsing refactorings