From 7e5ca005aeef31fc878ee220a3e21bc175ff8987 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sat, 21 Sep 2013 18:39:53 +0200 Subject: [PATCH] Fix parsing of BasicStops with both Arr and Dep times --- enabler/src/de/schildbach/pte/AbstractHafasProvider.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/enabler/src/de/schildbach/pte/AbstractHafasProvider.java b/enabler/src/de/schildbach/pte/AbstractHafasProvider.java index ac6787a4..43bf09d5 100644 --- a/enabler/src/de/schildbach/pte/AbstractHafasProvider.java +++ b/enabler/src/de/schildbach/pte/AbstractHafasProvider.java @@ -1045,7 +1045,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider final Location via, final Location to) throws IOException { // System.out.println(request); - // ParserUtils.printXml(ParserUtils.scrape(apiUri, wrap(request, null), null, null)); + // ParserUtils.printXml(ParserUtils.scrape(queryEndpoint, wrap(request, null), null, null)); Reader reader = null; @@ -1188,6 +1188,12 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider while (pp.getName().equals("StAttrList")) XmlPullUtil.next(pp); final Location sectionDepartureLocation = parseLocation(pp); + + if (XmlPullUtil.test(pp, "Arr")) + { + XmlPullUtil.enter(pp, "Arr"); + XmlPullUtil.exit(pp, "Arr"); + } XmlPullUtil.enter(pp, "Dep"); XmlPullUtil.require(pp, "Time"); time.setTimeInMillis(currentDate.getTimeInMillis());