Iām fairly new to using RegEx to obtain information from XML files. I am trying to get the main information from each section to display in an array but cannot figure it out. I would appreciate any help possible for this.
I think I have split each section that I would like to return information from but I am not sure on how to put this all together in order to display the resulting array in a table.
The XML I am using can be found here: National Roads Weather Station Data http://data.tii.ie/Datasets/Its/DatexII/WeatherData/Content.xml
The RegEx that I have created for the parts I want to use are:
Road ID
(NRA\d+)
Date & Time
(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})
Air Temperature
<airTemperature>(\d{1,2}.\d{1})<\/airTemperature>
Wind Direction
<windDirectionCompass>(\w+)<\/windDirectionCompass>
Wind Speed
<windSpeed>(\d{1,3}.\d{1})<\/windSpeed>
Road Temperature
<roadSurfaceTemperature>(\d{1,3}.\d{1})<\/roadSurfaceTemperature>
If anyone could show me how this would work I would really appreciate it as I am trying to develop my coding skills into new areas. Thanks!