We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there.
I am working with an XML feed of train stations that shows departure/arrival times. The feed was retreived from this page: api.irishrail.ie/realtime/index.htm?realtime_irishrail
The feed in question is this one: api.irishrail.ie/realtime/realtime.asmx/getStationDataByCodeXML?StationCode=mhide
Other feeds within the first link list all info for trains and stations to be contained within one XML, but the above feed does not allow you to view all (200 or so) stations at once. Instead it requires you to type your station into the URL/address bar each time. So basically, the 'mhide' at the end of the above URL is one station code. The literature says that this is the only way to access the information:
Does anyone know a method that would enable me to access all stations at once?
Many thanks in advance :)
Answers
I (kind of) solved it using the following code, though I'm currently troubleshooting the reason that this particular code runs very slowly.
Ok. But there was no need to start a new thread for the slowness question. Keep it all together so we have context.
Okay, sorry koogs. I shall continue in this one.
So I adjusted my class according to the advice from TfGuy44 and revisiting some of Daniel Schiffman's arrays/objects tutorials. This is where I'm at. I'm confused about where to loop: should I loop inside the display of the class or in draw()? :(
In case this is of use... before I tried to put the arcs into a class, it worked fine with the following code:
The class should be responsible for drawing itself. If it contains one thing then it should draw one thing and the iterating over the items, if appropriate, should be at the level that the group is defined.
Thanks for that, I kind of get you. I'll omit the class for the time being until I get a better understanding. My issue was not beginning with a class, but instead trying to make a class when the code was quite large.