X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fload%2Fxml%2FGpxHandler.java;h=771621b57f75b98ca1d5229704dda7b63e3a446b;hp=962b495741909fb0e46c1fc07c62c254df18a3d1;hb=da0b1f449260a0b4a94318006382a9039726ef3e;hpb=5625a1abadb5f2ca5f017fe7dbda1d5141cb637b diff --git a/tim/prune/load/xml/GpxHandler.java b/tim/prune/load/xml/GpxHandler.java index 962b495..771621b 100644 --- a/tim/prune/load/xml/GpxHandler.java +++ b/tim/prune/load/xml/GpxHandler.java @@ -13,6 +13,7 @@ import tim.prune.data.Field; */ public class GpxHandler extends XmlHandler { + private boolean _insideWaypoint = false; private boolean _insideName = false; private boolean _insideElevation = false; private boolean _insideTime = false; @@ -27,11 +28,12 @@ public class GpxHandler extends XmlHandler * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) */ public void startElement(String uri, String localName, String qName, - Attributes attributes) throws SAXException + Attributes attributes) throws SAXException { // Read the parameters for waypoints and track points if (qName.equalsIgnoreCase("wpt") || qName.equalsIgnoreCase("trkpt")) { + _insideWaypoint = qName.equalsIgnoreCase("wpt"); int numAttributes = attributes.getLength(); for (int i=0; i