smurfy/fahrplan — pull request #122 by leppa (2014-10-19 20:11:50+00:00)
Title: HAFAS XML: Considerable improvement in XML parsing time

Because I was making changes to a parser of, generally, undocumented format, I decided to push this change through a pull request. Just that you can have a second look.

Generally, I was using [this XML schema](http://stefanwehrmeyer.com/projects/vbbxsd/) as a spec plus looking on the real output from the services. Also, it seems that all services return journey details inline, so I the code that requests journey details from the service is untested.

One additional adjustment that I made: it seems that sometimes there is no `Attribute` with type `NAME` which causes train name to be an empty field (try to calculate journey from Wien to Hellifield with ÖBB and look at two last legs). But there still seems to be `CATEGORY` and `NUMBER` attributes. I use them in case `NAME` is not available.