Refactoring XML Parsing

Refactoring XML Parsing