Java Parser for reading and writing GPX files
using base from gpxparser
Follows GPX schema version 1.1
include jar to your classpath Download JAR
To read GPX file:
GPXParser p = new GPXParser();
FileInputStream in = new FileInputStream("inFile.gpx");
GPX gpx = p.parseGPX(in);
To write to GPX file:
GPXWriter writer = new GPXWriter();
FileOutputStream out = new FileOutputStream("outFile.gpx");
writer.writeGPX(gpx, out);
out.close();