Full image link →
Over 2000 National Rail stations. How did I put them all in an array in a couple of hours? Using this sly trick:
- Since all the stations are listed on the National Rail website, I did a screen scrape of the page and applied regular expressions to strip out the HTML I didn’t want.
- Alas, Yahoo Pipes only allows me to create a XML page, so I went a step further and wrote a simple Java program that retrieves HTML pages. Apply a few more regular expressions to strip out the XML and I get a list of 2000 stations, perfectly formatted with quotations and commas, ready to drop in to my Android app.
It’s amazing what technology can do.