Daniel Golan

Daniel Golan

  • NA
  • 45
  • 47.2k

Reading data from specific node

Jan 29 2011 12:57 PM
Hello,
Working on a project for reading som data from an xml file.

Have the xml  : http://www.yr.no/sted/Norge/Oslo/Oslo/Oslo/varsel.xml

and i somehow need to read data from this part inside the xml file

 <tabular>
<time from="2011-01-30T00:00:00" to="2011-01-30T06:00:00" period="0"><!-- Valid from 2011-01-30T00:00:00 to 2011-01-30T06:00:00 --><symbol number="3" name="Delvis skyet" var="mf/03n.86"/><precipitation value="0.0" minvalue="0.0" maxvalue="0.0"/><!-- Valid at 2011-01-30T00:00:00 --><windDirection deg="310.9" code="NW" name="Nordvest"/><windSpeed mps="3.5" name="Lett bris"/><temperature unit="celcius" value="-8"/><pressure unit="hPa" value="1019.3"/>
</time>

Ive been working some with code but cant figure out how i can use linq to go into tabular and read the node "time" and get the "from" attribute and populate a combolist and then be able to show the other data.

Using the <time from="2011-01-30T00:00:00" to="2011-01-30T06:00:00" period="0"> period attribute to the different "rows" in the dummy (morgen = period 1, dag =period 2 , kveld period 3) since then i can use the symbol number to deside wich weather icon to use in the periods (see dummy.zip).

Thanks for any help ! =)

Attachment: dummy.zip

Answers (3)