How to extract data
Posted: Sun Jun 05, 2011 10:40 am
I have a file called all-sensors.xml generated by meteohub. I want to display some date of this file on a software remote screen
This is a part of the file:
<item sensor="wind0" cat="dir" unit="deg">238</item>
<item sensor="wind0" cat="dir" unit="de">WSW</item>
<item sensor="wind0" cat="dir" unit="nl">WZW</item>
<item sensor="wind0" cat="dir" unit="en">WSW</item>
<item sensor="wind0" cat="gustspeed" unit="ms">1.8</item>
<item sensor="wind0" cat="gustspeed" unit="kmh">6.5</item>
<item sensor="wind0" cat="gustspeed" unit="mph">4.0</item>
<item sensor="wind0" cat="gustspeed" unit="kn">3.5</item>
<item sensor="wind0" cat="gustspeed" unit="bft">1.7</item>
<item sensor="wind0" cat="gustspeed" unit="bftint">2</item>
<item sensor="wind0" cat="speed" unit="ms">2.2</item>
<item sensor="wind0" cat="speed" unit="kmh">7.9</item>
<item sensor="wind0" cat="speed" unit="mph">4.9</item>
<item sensor="wind0" cat="speed" unit="kn">4.3</item>
<item sensor="wind0" cat="speed" unit="bft">1.9</item>
<item sensor="wind0" cat="speed" unit="bftint">2</item>
<item sensor="wind0" cat="chill" unit="c">26.3</item>
<item sensor="wind0" cat="chill" unit="f">79.3</item>
<item sensor="rain0" cat="rate" unit="mm">0.0</item>
<item sensor="rain0" cat="rate" unit="in">0.00</item>
<item sensor="rain0" cat="total" unit="mm">429.4</item>
<item sensor="rain0" cat="total" unit="in">16.91</item>
The text in red and underlined I want to extract to use.
Anybody a idea how to do that?
Henk
This is a part of the file:
<item sensor="wind0" cat="dir" unit="deg">238</item>
<item sensor="wind0" cat="dir" unit="de">WSW</item>
<item sensor="wind0" cat="dir" unit="nl">WZW</item>
<item sensor="wind0" cat="dir" unit="en">WSW</item>
<item sensor="wind0" cat="gustspeed" unit="ms">1.8</item>
<item sensor="wind0" cat="gustspeed" unit="kmh">6.5</item>
<item sensor="wind0" cat="gustspeed" unit="mph">4.0</item>
<item sensor="wind0" cat="gustspeed" unit="kn">3.5</item>
<item sensor="wind0" cat="gustspeed" unit="bft">1.7</item>
<item sensor="wind0" cat="gustspeed" unit="bftint">2</item>
<item sensor="wind0" cat="speed" unit="ms">2.2</item>
<item sensor="wind0" cat="speed" unit="kmh">7.9</item>
<item sensor="wind0" cat="speed" unit="mph">4.9</item>
<item sensor="wind0" cat="speed" unit="kn">4.3</item>
<item sensor="wind0" cat="speed" unit="bft">1.9</item>
<item sensor="wind0" cat="speed" unit="bftint">2</item>
<item sensor="wind0" cat="chill" unit="c">26.3</item>
<item sensor="wind0" cat="chill" unit="f">79.3</item>
<item sensor="rain0" cat="rate" unit="mm">0.0</item>
<item sensor="rain0" cat="rate" unit="in">0.00</item>
<item sensor="rain0" cat="total" unit="mm">429.4</item>
<item sensor="rain0" cat="total" unit="in">16.91</item>
The text in red and underlined I want to extract to use.
Anybody a idea how to do that?
Henk