verkar som jag är "lite" oklar...
Jag vill bara få ut den fetmarkerade 2an hur ska jag då göra med xml-tag / xpath?
Programmet ser ut som bilden ovan så jag ska bara säg hur den hittar 2an
<?xml version="1.0" encoding="utf-8" ?>
- <weatherdata>
- <location>
<name>Flyinge</name>
<type>Populated place</type>
<country>Sweden</country>
<timezone id="Europe/Stockholm" utcoffsetMinutes="60" />
<location altitude="15" latitude="55.75" longitude="13.35" geobase="geonames" geobaseid="2714208" />
</location>
- <credit>
- <!--
In order to use the free weather data from yr no, you HAVE to display
the following text clearly visible on your web page. The text should be a
link to the specified URL.
-->
- <!-- Please read more about our conditions and guidelines at
http://www.yr.no/verdata/
-->
<link text="Weather forecast from yr.no, delivered by the Norwegian Meteorological Institute and the NRK" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/" />
</credit>
- <links>
<link id="xmlSource" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/forecast.xml" />
<link id="xmlSourceHourByHour" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/forecast_hour_by_hour.xml" />
<link id="overview" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/" />
<link id="hourByHour" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/hour_by_hour" />
<link id="longTermForecast" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/long" />
<link id="radar" url="http://www.yr.no/place/Sweden/Scania/Flyinge~2714208/radar.html" />
</links>
- <meta>
<lastupdate>2012-02-26T04:26:22</lastupdate>
<nextupdate>2012-02-26T17:00:00</nextupdate>
</meta>
<sun rise="2012-02-26T07:06:48" set="2012-02-26T17:33:20" />
- <forecast>
- <tabular>
- <time from="2012-02-26T12:00:00" to="2012-02-26T18:00:00" period="2">
- <!-- Valid from 2012-02-26T12:00:00 to 2012-02-26T18:00:00
-->
<symbol number="1" name="Fair" var="01d" />
<precipitation value="0" />
- <!-- Valid at 2012-02-26T12:00:00
-->
<windDirection deg="327.3" code="NNW" name="North-northwest" />
<windSpeed mps="5.3" name="Gentle breeze" />
<temperature unit="celsius" value="3" />
<pressure unit="hPa" value="1019.8" />
</time>
- <time from="2012-02-26T18:00:00" to="2012-02-27T00:00:00" period="3">
- <!-- Valid from 2012-02-26T18:00:00 to 2012-02-27T00:00:00
-->
<symbol number="1" name="Fair" var="mf/01n.13" />
<precipitation value="0" />
- <!-- Valid at 2012-02-26T18:00:00
-->
<windDirection deg="323.6" code="NW" name="Northwest" />
<windSpeed mps="4.5" name="Gentle breeze" />
<temperature unit="celsius" value="0" />
<pressure unit="hPa" value="1022.1" />
</time>