Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. generate a result based on a XML file [modified]

generate a result based on a XML file [modified]

Scheduled Pinned Locked Moved XML / XSL
3 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alexyxj
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • A alexyxj

      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

      A Offline
      A Offline
      alexyxj
      wrote on last edited by
      #2

      <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>

      A 1 Reply Last reply
      0
      • A alexyxj

        <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>

        A Offline
        A Offline
        alexyxj
        wrote on last edited by
        #3

        no one can help? :(

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups