I want to get the value temperature which is in the <element type = 'air_temperature_maximum'> under <forecast-period>. I only want it for the area 'Melbourne'.
xml source = http://www.bom.gov.au/fwo/IDV10753.xml
I tried the following, but this only prints out the entire parsed xml rather than what i intend to get.
import xml.etree.ElementTree as ET
import requests
url = "http://www.bom.gov.au/fwo/IDV10753.xml"
response = requests.get(url, verify=False).content.decode('UTF-8')
tree = ET.parse(response)
print(tree.find('product').find('amoc').find('forecast').find('area')
.find('forecast-period').find('element').text)
I want all the 7 day temperature value which is in <element type = 'air_temperature_maximum'> for the area 'Melbourne'. Any help is much appreciated.