XML Parser
Parser to fetch and display train schedule.

Getting the Data
Irish Rail provides an open XML feed for its live schedule data.
I used the endpoint
getStationDataByCodeXML_WithNumMins
to request the next 90 minutes of trains for Pearse Station.
The feed includes everything from the train code and origin to expected arrival and departure times.
About the Irish Rail API
The Irish Rail Realtime API is a publicly accessible service that provides up-to-date information about train movements across Ireland. It returns data in XML format, making it easy to parse and transform into custom visualisations or tools. What makes it particularly interesting is that it’s fully open, no authentication or API key is required, so anyone can experiment with the live data feed and build their own applications around it.
Each endpoint focuses on a different type of data, such as station timetables, train progress, or full route details.
For this project, I specifically used the getStationDataByCodeXML_WithNumMins
endpoint,
which lets you specify a station code (like PERSE
for Pearse) and a time window in minutes to retrieve all trains
expected within that period.
Parsing the XML
I wanted to see how easily this data could be transformed into something readable.
Using a simple XML parsing script, I extracted key fields such as
<Origin>
, <Destination>
,
<Exparrival>
, and <Expdepart>
.
From there, I built a small HTML table that displays each train as a row.
Displaying the Results
The generated HTML shows:
- Expected Arrival Time
- Origin
- Destination
- Expected Departure Time
- Arrival Time at Destination
It’s lightweight, automatically updates when refreshed, and gives a quick snapshot of what’s happening on the Irish Rail network in real time.