diff --git a/enabler/src/de/schildbach/pte/AbstractHafasProvider.java b/enabler/src/de/schildbach/pte/AbstractHafasProvider.java index 9a5ccc71..260a57fb 100644 --- a/enabler/src/de/schildbach/pte/AbstractHafasProvider.java +++ b/enabler/src/de/schildbach/pte/AbstractHafasProvider.java @@ -338,11 +338,11 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider pp.setInput(reader); assertResC(pp); - XmlPullUtil.enter(pp); + XmlPullUtil.enter(pp, "ResC"); XmlPullUtil.require(pp, "LocValRes"); XmlPullUtil.requireAttr(pp, "id", "req"); - XmlPullUtil.enter(pp); + XmlPullUtil.enter(pp, "LocalValRes"); while (pp.getEventType() == XmlPullParser.START_TAG) { @@ -361,7 +361,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider XmlPullUtil.next(pp); } - XmlPullUtil.exit(pp); + XmlPullUtil.exit(pp, "LocalValRes"); return results; } @@ -1426,7 +1426,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider trips.add(new Trip(id, departureLocation, arrivalLocation, legs, null, capacity, numTransfers)); } - XmlPullUtil.exit(pp); + XmlPullUtil.exit(pp, "ConnectionList"); return new QueryTripsResult(header, null, from, via, to, context, trips); } @@ -1463,13 +1463,13 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider while (XmlPullUtil.test(pp, "AttributeVariant")) { final String type = XmlPullUtil.attr(pp, "type"); - XmlPullUtil.enter(pp); + XmlPullUtil.enter(pp, "AttributeVariant"); final String value; if (XmlPullUtil.test(pp, "Text")) value = XmlPullUtil.text(pp).trim(); else value = null; - XmlPullUtil.exit(pp); + XmlPullUtil.exit(pp, "AttributeVariant"); attributeVariants.put(type, value); } diff --git a/enabler/src/de/schildbach/pte/util/XmlPullUtil.java b/enabler/src/de/schildbach/pte/util/XmlPullUtil.java index feb74f4a..34b3e6eb 100644 --- a/enabler/src/de/schildbach/pte/util/XmlPullUtil.java +++ b/enabler/src/de/schildbach/pte/util/XmlPullUtil.java @@ -20,11 +20,6 @@ public final class XmlPullUtil pp.require(XmlPullParser.START_TAG, null, tagName); } - /** - * enters current tag - * - * @throws IOException - */ public static void enter(final XmlPullParser pp) throws XmlPullParserException, IOException { if (pp.getEventType() != XmlPullParser.START_TAG) @@ -82,8 +77,8 @@ public final class XmlPullUtil if (!pp.isEmptyElementTag()) { - enter(pp); - exit(pp); + enter(pp, tagName); + exit(pp, tagName); } else {