package tim.prune.load.xml; import java.util.ArrayList; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import tim.prune.data.Field; /** * Class for handling specifics of parsing Gpx files */ public class GpxHandler extends XmlHandler { private boolean _insideName = false; private boolean _insideElevation = false; private boolean _insideTime = false; private String _name = null, _latitude = null, _longitude = null; private String _elevation = null; private String _time = null; private ArrayList _pointList = new ArrayList(); /** * Receive the start of a tag * @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 { // Read the parameters for waypoints and track points if (qName.equalsIgnoreCase("wpt") || qName.equalsIgnoreCase("trkpt")) { int numAttributes = attributes.getLength(); for (int i=0; i