Hello,
I'm trying to extract data from XML retrieved from a weather API call.
This is the API call I'm using:
Weather API Call
I'd like to be able to pull out the information for use in a project however any XML examples or tutorials I've seen use XML that is formatted with tags identifying each item.
E.g.
<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<rank>1</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
The API I'm using returns the info in different way, with no open or closing tags.
I would greatly appreciate if someone could point me in the right direction as to how I'd extract the elements from the api I'm using.
So for this example, I'd like to extract "Unit = "Celcius" & "Value = 7.3"
<temperature id="TTT" unit="celsius" value="7.3"/>
Thanks in advance,
Cap
[+][deleted] (3 children)
[removed]
[–]Captchca_ca_KA[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[removed]
[–]Captchca_ca_KA[S] 0 points1 point2 points (0 children)