I am hoping you could help with this one too… I am starting to understand your code above… how the file gets loaded, scanned. Finds the literal and sets the sensor… It is starting to make sense…
However I still like to see one last example before you let me loose on the world - this example is a little different - having multiple fields of interest - and its repeated for each day - so the data changes…
The XML file is similar information - but its actually different data… Its located at cfa.vic.gov.au/cfa/rssfeed/central-firedistrict_rss.xml
Current contents look like this:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
<channel>
<title>Country Fire Authority - Victoria, Australia - Total Fire Ban & Fire Danger Ratings - Central Forecast</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description>Country Fire Authority - Victoria, Australia - Total Fire Ban & Fire Danger Ratings - Central Forecast.</description>
<pubDate>Wed, 26 Feb 2025 19:50:57 GMT</pubDate>
<dc:date>2025-02-26T19:50:57</dc:date>
<item>
<title>Thursday, 27 February 2025</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description><p>Today, Thu, 27 Feb 2025 is not currently a day of Total Fire Ban.</p><p>Fire Danger Ratings<br/>Bureau of Meteorology forecast issued at: Thursday, 27 February 2025 05:30 AM</p><p>Central: MODERATE</p><p><img src="http://www.cfa.vic.gov.au/cfa/images/fdr/central/moderate.gif" alt="" border="0" /></p><p><img src="http://www.cfa.vic.gov.au/cfa/images/tfb_icon_big.png" alt="" width="22" height="22" /> Displays when Total Fire Ban in force<br /><span><a href="http://www.cfa.vic.gov.au/warnings-restrictions/restrictions-during-fire-danger-periods">Restrictions may apply</a></span></p></description>
<guid>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</guid>
</item>
<item>
<title>Friday, 28 February 2025</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description><p>Tomorrow, Fri, 28 Feb 2025 is not currently a day of Total Fire Ban.</p><p>Fire Danger Ratings<br/>Bureau of Meteorology forecast issued at: Thursday, 27 February 2025 05:30 AM</p><p>Central: HIGH</p><p><img src="http://www.cfa.vic.gov.au/cfa/images/fdr/central/high.gif" alt="" border="0" /></p><p><img src="http://www.cfa.vic.gov.au/cfa/images/tfb_icon_big.png" alt="" width="22" height="22" /> Displays when Total Fire Ban in force<br /><span><a href="http://www.cfa.vic.gov.au/warnings-restrictions/restrictions-during-fire-danger-periods">Restrictions may apply</a></span></p></description>
<guid>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</guid>
</item>
<item>
<title>Saturday, 01 March 2025</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description><p>Sat, 1 Mar 2025 is not currently a day of Total Fire Ban.</p><p>Fire Danger Ratings<br/>Bureau of Meteorology forecast issued at: Thursday, 27 February 2025 05:30 AM</p><p>Central: HIGH</p><p><img src="http://www.cfa.vic.gov.au/cfa/images/fdr/central/high.gif" alt="" border="0" /></p><p><img src="http://www.cfa.vic.gov.au/cfa/images/tfb_icon_big.png" alt="" width="22" height="22" /> Displays when Total Fire Ban in force<br /><span><a href="http://www.cfa.vic.gov.au/warnings-restrictions/restrictions-during-fire-danger-periods">Restrictions may apply</a></span></p></description>
<guid>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</guid>
</item>
<item>
<title>Sunday, 02 March 2025</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description><p>Sun, 2 Mar 2025 is not currently a day of Total Fire Ban.</p><p>Fire Danger Ratings<br/>Bureau of Meteorology forecast issued at: Thursday, 27 February 2025 05:30 AM</p><p>Central: MODERATE</p><p><img src="http://www.cfa.vic.gov.au/cfa/images/fdr/central/moderate.gif" alt="" border="0" /></p><p><img src="http://www.cfa.vic.gov.au/cfa/images/tfb_icon_big.png" alt="" width="22" height="22" /> Displays when Total Fire Ban in force<br /><span><a href="http://www.cfa.vic.gov.au/warnings-restrictions/restrictions-during-fire-danger-periods">Restrictions may apply</a></span></p></description>
<guid>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</guid>
</item>
<item>
<title>Monday, 03 March 2025</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description><p>Mon, 3 Mar 2025 is not currently a day of Total Fire Ban.</p><p>Fire Danger Ratings</p><p>Central: NO RATING</p><p><img src="http://www.cfa.vic.gov.au/cfa/images/fdr/central/norating.gif" alt="" border="0" /></p><p><img src="http://www.cfa.vic.gov.au/cfa/images/tfb_icon_big.png" alt="" width="22" height="22" /> Displays when Total Fire Ban in force<br /><span><a href="http://www.cfa.vic.gov.au/warnings-restrictions/restrictions-during-fire-danger-periods">Restrictions may apply</a></span></p></description>
<guid>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</guid>
</item>
<item>
<title>Fire restrictions by muncipality</title>
<link>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</link>
<description><p>BALLARAT:Restrictions in force: 25/11/2024 - 01/05/2025<br/>BANYULE:Restrictions in force: 25/11/2024 - 01/05/2025<br/>BASS COAST:Restrictions in force: 09/12/2024 - 01/05/2025<br/>BOROUGH OF QUEENSCLIFFE:Restrictions in force: 25/11/2024 - 01/05/2025<br/>CARDINIA:Restrictions in force: 09/12/2024 - 01/05/2025<br/>CASEY:Restrictions in force: 09/12/2024 - 01/05/2025<br/>FRANKSTON:Restrictions in force: 09/12/2024 - 01/05/2025<br/>FRENCH ISLAND:Restrictions in force: 09/12/2024 - 01/05/2025<br/>GOLDEN PLAINS:Restrictions in force: 25/11/2024 - 01/05/2025<br/>GREATER DANDENONG:Restrictions in force: 09/12/2024 - 01/05/2025<br/>GREATER GEELONG:Restrictions in force: 25/11/2024 - 01/05/2025<br/>HEPBURN:Restrictions in force: 25/11/2024 - 01/05/2025<br/>HUME:Restrictions in force: 18/11/2024 - 01/05/2025<br/>KINGSTON:Restrictions in force: 09/12/2024 - 01/05/2025<br/>KNOX:Restrictions in force: 23/12/2024 - 01/05/2025<br/>MACEDON RANGES:Restrictions in force: 25/11/2024 - 01/05/2025<br/>MANNINGHAM:Restrictions in force: 23/12/2024 - 01/05/2025<br/>MAROONDAH:Restrictions in force: 23/12/2024 - 01/05/2025<br/>MELTON:Restrictions in force: 18/11/2024 - 01/05/2025<br/>MOORABOOL:Restrictions in force: 25/11/2024 - 01/05/2025<br/>MORNINGTON PENINSULA:Restrictions in force: 09/12/2024 - 01/05/2025<br/>NILLUMBIK:Restrictions in force: 25/11/2024 - 01/05/2025<br/>SURF COAST:Restrictions in force: 25/11/2024 - 01/05/2025<br/>WHITTLESEA:Restrictions in force: 18/11/2024 - 01/05/2025<br/>WYNDHAM:Restrictions in force: 18/11/2024 - 01/05/2025<br/>YARRA RANGES:Restrictions in force: 23/12/2024 - 01/05/2025<br/></p></description>
<guid>http://www.cfa.vic.gov.au/warnings-restrictions/total-fire-bans-and-ratings/central-fire-district</guid>
</item>
</channel>
</rss>
I would like to build a table that shows for each day - whether it is a total fire ban or not and the fire rating. Something like this
Thursday, 27 February 2025 No Fire Ban Moderate
Friday, 28 February 2025 No Fire Ban Moderate
Saturday, 1 March 2025 No Fire Ban Moderate
Sunday, 2 March 20255 No Fire Ban Moderate
Monday, 3 March 2025 No Fire Ban Moderate
So Sensors created like
TFB_Date0 TFB_Ban0 TFB_Rating0
TFB_Date1 TFB_Ban1 TFB_Rating1
TFB_Date2 TFB_Ban2 TFB_Rating2
TFB_Date3 TFB_Ban3 TFB_Rating3
TFB_Date4 TFB_Ban4 TFB_Rating4
The values in the XML file - literals are dates, Ban is either “is not currently a day of Total Fire Ban” or can be ‘day of Total Fire ban", and Rating can be “No Rating”, “Moderate”, “High”, "Extreme’, Catastrophic" - but with the ratings and Bans I would just take the literal string of whatever is there…
Hints / Solutions on getting this done - I actually want to get two regions scraped from 2 different regions and present it all together, but getting one done, I am sure I can get it all put together and presented nicely.