parse well-formatted StationTable

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@793 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-09-26 06:11:44 +00:00
parent ce033e31cb
commit 535ee011bd

View file

@ -470,6 +470,13 @@ public abstract class AbstractHafasProvider implements NetworkProvider
throw new IllegalArgumentException("unknown error " + code + ", " + text);
}
if (XmlPullUtil.test(pp, "StationTable"))
{
XmlPullUtil.enter(pp, "StationTable");
if (pp.getEventType() == XmlPullParser.TEXT)
pp.nextTag();
}
while (XmlPullUtil.test(pp, "Journey"))
{
final String fpTime = XmlPullUtil.attr(pp, "fpTime");
@ -597,6 +604,9 @@ public abstract class AbstractHafasProvider implements NetworkProvider
XmlPullUtil.enter(pp, "Journey");
XmlPullUtil.exit(pp, "Journey");
}
if (pp.getEventType() == XmlPullParser.TEXT)
pp.nextTag();
}
result.stationDepartures.add(new StationDepartures(new Location(LocationType.STATION, stationId), departures, null));