XML parsing now working correctly