All Projects → ticofab → Android Gpx Parser

ticofab / Android Gpx Parser

Licence: apache-2.0
A library to parse XML Gpx files, built for Android.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Gpx Parser

Oga
Read-only mirror of https://gitlab.com/yorickpeterse/oga
Stars: ✭ 1,147 (+1351.9%)
Mutual labels:  xml, xml-parser
Libexpat
🌿 Expat library: Fast streaming XML parser written in C; in the process of migrating from SourceForge to GitHub
Stars: ✭ 549 (+594.94%)
Mutual labels:  xml, xml-parser
Node Xml2js
XML to JavaScript object converter.
Stars: ✭ 4,402 (+5472.15%)
Mutual labels:  xml, xml-parser
Node Rest Client
REST API client from node.js
Stars: ✭ 365 (+362.03%)
Mutual labels:  xml, xml-parser
Xylophone
Xylophone
Stars: ✭ 23 (-70.89%)
Mutual labels:  xml, xml-parser
Tikxml
Modern XML Parser for Android
Stars: ✭ 370 (+368.35%)
Mutual labels:  xml, xml-parser
Quick Xml
Rust high performance xml reader and writer
Stars: ✭ 480 (+507.59%)
Mutual labels:  xml, xml-parser
Posthtml
PostHTML is a tool to transform HTML/XML with JS plugins
Stars: ✭ 2,737 (+3364.56%)
Mutual labels:  xml, xml-parser
Fuzi
A fast & lightweight XML & HTML parser in Swift with XPath & CSS support
Stars: ✭ 894 (+1031.65%)
Mutual labels:  xml, xml-parser
Easyxml
Simplifies parsing and modifying of (huge) XML streams (files) based on the StAX parser with combination of JAXB or JDom2
Stars: ✭ 6 (-92.41%)
Mutual labels:  xml, xml-parser
Hquery.php
An extremely fast web scraper that parses megabytes of invalid HTML in a blink of an eye. PHP5.3+, no dependencies.
Stars: ✭ 295 (+273.42%)
Mutual labels:  xml, xml-parser
Xml Js
Converter utility between XML text and Javascript object / JSON text.
Stars: ✭ 874 (+1006.33%)
Mutual labels:  xml, xml-parser
fox
A Fortran XML library
Stars: ✭ 51 (-35.44%)
Mutual labels:  xml, xml-parser
Camaro
camaro is an utility to transform XML to JSON, using Node.js binding to native XML parser pugixml, one of the fastest XML parser around.
Stars: ✭ 438 (+454.43%)
Mutual labels:  xml, xml-parser
xgen
XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator
Stars: ✭ 153 (+93.67%)
Mutual labels:  xml, xml-parser
Xmlcoder
Easy XML parsing using Codable protocols in Swift
Stars: ✭ 460 (+482.28%)
Mutual labels:  xml, xml-parser
Xmlquery
xmlquery is Golang XPath package for XML query.
Stars: ✭ 209 (+164.56%)
Mutual labels:  xml, xml-parser
Pugixml
Light-weight, simple and fast XML parser for C++ with XPath support
Stars: ✭ 2,809 (+3455.7%)
Mutual labels:  xml, xml-parser
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+860.76%)
Mutual labels:  xml, xml-parser
Cheatyxml
CheatyXML is a Swift framework designed to manage XML easily
Stars: ✭ 23 (-70.89%)
Mutual labels:  xml, xml-parser

Android GPX Parser

A library to parse XML Gpx files, built for Android. The reference schema is the Topografix GPX 1.1. Pull requests are welcome!

Android Arsenal

Projects using this library:

To have your project listed here, send me an email or open a PR.

Download

Grab via Gradle:

api 'io.ticofab.androidgpxparser:parser:1.6.0'
// compile 'io.ticofab.androidgpxparser:parser:1.6.0' - for gradle plugin < 3.0.0

Dependencies

Usage

Get a parser instance:

GPXParser mParser = new GPXParser(); // consider injection

Then there are two options: given an InputStream,

Gpx parsedGpx = null;
try {
    InputStream in = getAssets().open("test.gpx");
    parsedGpx = mParser.parse(in);
} catch (IOException | XmlPullParserException e) {
    // do something with this exception
    e.printStackTrace();
}
if (parsedGpx == null) {
    // error parsing track
} else {
    // do something with the parsed track
    // see included example app and tests
}

or you might want to fetch the Gpx track from a server and parse it. In that case, pass the track Url and a listener. Both fetching and parsing happen on a background thread.

mParser.parse("http://myserver.com/track.gpx", new GpxFetchedAndParsed() {
      @Override
      public void onGpxFetchedAndParsed(Gpx gpx) {
          if (gpx == null) {
              // error parsing track
          } else {
              // do something with the parsed track
              // see included example app and tests
          }
      }
  });

Contribute

Contributions are welcome! Please check the issues and open a pull request when done: you will have made the world a better place.

License

Copyright 2015 - 2019 Fabio Tiriticco - Fabway

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].