Refactored to parse XML views