I'm trying to read an XML and its content/attributes from a website. I'm having trouble reading the XML itself.
For example, the XML at my website looks like this. Any number of items is contained within a record grouped by date:
<weatherReport>
<record date="2021y04m05d">
<item time="060452" conditions="sun" url="https://example.com/weatherAPI/detailedReport/1.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060453" conditions="sun" url="https://example.com/weatherAPI/detailedReport/2.xml">Currently Sunny. High 34 Degrees. Low 24 Degrees.</item>
<item time="060454" conditions="sun" url="https://example.com/weatherAPI/detailedReport/3.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060951" conditions="rain" url="https://example.com/weatherAPI/detailedReport/4.xml">Currently Rainy. High 41 Degrees. Low 36 Degrees.</item>
<item time="060952" conditions="rain" url="https://example.com/weatherAPI/detailedReport/5.xml">Currently Rainy. High 42 Degrees. Low 40 Degrees.</item>
<item time="060953" conditions="rain" url="https://example.com/weatherAPI/detailedReport/6.xml">Currently Rainy. High 49 Degrees. Low 39 Degrees.</item>
</record>
<record date="2021y04m04d">
<item time="060452" conditions="sun" url="https://example.com/weatherAPI/detailedReport/1.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060453" conditions="sun" url="https://example.com/weatherAPI/detailedReport/2.xml">Currently Sunny. High 34 Degrees. Low 24 Degrees.</item>
</record>
<record date="2021y04m03d">
<item time="060952" conditions="rain" url="https://example.com/weatherAPI/detailedReport/5.xml">Currently Rainy. High 42 Degrees. Low 40 Degrees.</item>
<item time="060953" conditions="rain" url="https://example.com/weatherAPI/detailedReport/6.xml">Currently Rainy. High 49 Degrees. Low 39 Degrees.</item>
</record>
<record date="2021y04m02d">
<item time="060452" conditions="sun" url="https://example.com/weatherAPI/detailedReport/1.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060453" conditions="sun" url="https://example.com/weatherAPI/detailedReport/2.xml">Currently Sunny. High 34 Degrees. Low 24 Degrees.</item>
<item time="060454" conditions="sun" url="https://example.com/weatherAPI/detailedReport/3.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060951" conditions="rain" url="https://example.com/weatherAPI/detailedReport/4.xml">Currently Rainy. High 41 Degrees. Low 36 Degrees.</item>
<item time="060952" conditions="rain" url="https://example.com/weatherAPI/detailedReport/5.xml">Currently Rainy. High 42 Degrees. Low 40 Degrees.</item>
<item time="060953" conditions="rain" url="https://example.com/weatherAPI/detailedReport/6.xml">Currently Rainy. High 49 Degrees. Low 39 Degrees.</item>
</record>
<record date="2021y04m01d">
<item time="060452" conditions="sun" url="https://example.com/weatherAPI/detailedReport/1.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060453" conditions="sun" url="https://example.com/weatherAPI/detailedReport/2.xml">Currently Sunny. High 34 Degrees. Low 24 Degrees.</item>
<item time="060454" conditions="sun" url="https://example.com/weatherAPI/detailedReport/3.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060951" conditions="rain" url="https://example.com/weatherAPI/detailedReport/4.xml">Currently Rainy. High 41 Degrees. Low 36 Degrees.</item>
<item time="060952" conditions="rain" url="https://example.com/weatherAPI/detailedReport/5.xml">Currently Rainy. High 42 Degrees. Low 40 Degrees.</item>
<item time="060953" conditions="rain" url="https://example.com/weatherAPI/detailedReport/6.xml">Currently Rainy. High 49 Degrees. Low 39 Degrees.</item>
</record>
<record date="2021y03m31d">
<item time="060452" conditions="sun" url="https://example.com/weatherAPI/detailedReport/1.xml">Currently Sunny. High 36 Degrees. Low 24 Degrees.</item>
<item time="060953" conditions="rain" url="https://example.com/weatherAPI/detailedReport/6.xml">Currently Rainy. High 49 Degrees. Low 39 Degrees.</item>
</record>
<record date="2021y03m30d">
<item time="060953" conditions="rain" url="https://example.com/weatherAPI/detailedReport/6.xml">Currently Rainy. High 49 Degrees. Low 39 Degrees.</item>
</record>
</weatherReport>
I have several questions about how to retrieve this data. I'll ask them all in one question so I won't have to make any additional questions again about this topic.
First, how would I get the value of the record's date (<record date="">) when supplied the record's number in the xml (e.x the First Record)?
Second, how would I get the value of item time/conditions (attribute) within each item when given the record number (e.g the first record) and the item number within the record (e.g the second item in the first record record).
Third, how would I get the actual contents of each item when provided the record number and the item number (such as "Currently Sunny. High 36 Degrees. Low 24 Degrees.")?
So far, I've tried this code to download some XML from my website:
Dim address As String = "https://example.com/weatherAPI/collectiveReport.xml"
Dim client As WebClient = New WebClient()
Dim reader As StreamReader = New StreamReader(client.OpenRead(address))
Dim rawXML As String = reader.ReadToEnd()
and It works fetching the raw XML. However, this does not work with any of the numerous examples provided online because they all read XML from a file saved on the user's computer. Since I make requests very quickly, I cannot download the XML online to a file on the PC because it is not efficient saving many XML files to the PC. I haven't found any good sources solving these issues.
Is there any way I can solve these three problems?