Refactoring for XSD parser