generate a result based on a XML file [modified]
-
I need to extract some results from a XML file. The XML sort of like the below (each day has a record). The results are expected to be imported into a table with four columns (Month, Total rain for each month, highest temp for each month, lowest tem for each month) and 12 rows (for each month). Can anyone help to provide some solutions? how to retrive and do simply calculation for this scenario? Many thanks. <climatedata> <lang>ENG</lang> <stationdata day="1" month="1" year="2008"> <maxtemp description="Maximum Temperature" units="°C">8.80</maxtemp> <mintemp description="Minimum Temperature" units="°C">3.90</mintemp> <meantemp description="Mean Temperature" units="°C">6.40</meantemp> <totalrain description="Total Rain" units="mm">0.00</totalrain> <totalsnow description="Total Snow" units="cm">0.00</totalsnow> <totalprecipitation description="Total Precipitation" units="mm">0.00</totalprecipitation> <snowonground description="Snow on Ground" units="cm">0.00</snowonground> <dirofmaxgust description="Direction of Maximum Gust" flag="E" units="10's Deg">6.00</dirofmaxgust> <speedofmaxgust description="Speed of Maximum Gust" flag="E" units="km/h">54.00</speedofmaxgust> <heatdegdays description="Heating Degree Days" units="°C">11.60</heatdegdays> <cooldegdays description="Cooling Degree Days" units="°C">0.00</cooldegdays> </stationdata>
modified on Tuesday, March 31, 2009 12:49 PM
-
I need to extract some results from a XML file. The XML sort of like the below (each day has a record). The results are expected to be imported into a table with four columns (Month, Total rain for each month, highest temp for each month, lowest tem for each month) and 12 rows (for each month). Can anyone help to provide some solutions? how to retrive and do simply calculation for this scenario? Many thanks. <climatedata> <lang>ENG</lang> <stationdata day="1" month="1" year="2008"> <maxtemp description="Maximum Temperature" units="°C">8.80</maxtemp> <mintemp description="Minimum Temperature" units="°C">3.90</mintemp> <meantemp description="Mean Temperature" units="°C">6.40</meantemp> <totalrain description="Total Rain" units="mm">0.00</totalrain> <totalsnow description="Total Snow" units="cm">0.00</totalsnow> <totalprecipitation description="Total Precipitation" units="mm">0.00</totalprecipitation> <snowonground description="Snow on Ground" units="cm">0.00</snowonground> <dirofmaxgust description="Direction of Maximum Gust" flag="E" units="10's Deg">6.00</dirofmaxgust> <speedofmaxgust description="Speed of Maximum Gust" flag="E" units="km/h">54.00</speedofmaxgust> <heatdegdays description="Heating Degree Days" units="°C">11.60</heatdegdays> <cooldegdays description="Cooling Degree Days" units="°C">0.00</cooldegdays> </stationdata>
modified on Tuesday, March 31, 2009 12:49 PM
<climatedata> <lang>ENG</lang> <stationdata day="1" month="1" year="2008"> <maxtemp description="Maximum Temperature" units="°C">8.80</maxtemp> <mintemp description="Minimum Temperature" units="°C">3.90</mintemp> <meantemp description="Mean Temperature" units="°C">6.40</meantemp> <totalrain description="Total Rain" units="mm">0.00</totalrain> </stationdata> <stationdata day="2" month="1" year="2008"> <maxtemp description="Maximum Temperature" units="°C">7.60</maxtemp> <mintemp description="Minimum Temperature" units="°C">2.60</mintemp> <meantemp description="Mean Temperature" units="°C">5.10</meantemp> <totalrain description="Total Rain" units="mm">9.40</totalrain> </stationdata>
-
<climatedata> <lang>ENG</lang> <stationdata day="1" month="1" year="2008"> <maxtemp description="Maximum Temperature" units="°C">8.80</maxtemp> <mintemp description="Minimum Temperature" units="°C">3.90</mintemp> <meantemp description="Mean Temperature" units="°C">6.40</meantemp> <totalrain description="Total Rain" units="mm">0.00</totalrain> </stationdata> <stationdata day="2" month="1" year="2008"> <maxtemp description="Maximum Temperature" units="°C">7.60</maxtemp> <mintemp description="Minimum Temperature" units="°C">2.60</mintemp> <meantemp description="Mean Temperature" units="°C">5.10</meantemp> <totalrain description="Total Rain" units="mm">9.40</totalrain> </stationdata>