@ Override public void startElement ( String uri , String localName , String qName , Attributes attributes ) throws SAXException { if ( localName . compareToIgnoreCase ( GPXTags . GPX ) == 0 ) { version = attributes . getValue ( GPXTags . VERSION ) ; } else if ( localName . compareToIgnoreCase ( GPXTags . RTE ) == 0 ) { totalRte ++ ; } else if ( localName . compareToIgnoreCase ( GPXTags . TRK ) == 0 ) { totalTrk ++ ; } else if ( localName . compareToIgnoreCase ( GPXTags . TRKSEG ) == 0 ) { totalTrkseg ++ ; } else if ( localName . compareToIgnoreCase ( GPXTags . WPT ) == 0 ) { totalWpt ++ ; } else if ( localName . compareToIgnoreCase ( GPXTags . RTEPT ) == 0 ) { totalRtept ++ ; } else if ( localName . compareToIgnoreCase ( GPXTags . TRKPT ) == 0 ) { totalTrkpt ++ ; } }
Fires whenever an XML start markup is encountered . It indicates which version of gpx file is to be parsed . It counts the waypoints routes routepoints tracks track segments and trackpoints .