method to extract weather data from xml file