HavenGPXParser

A Swift package for parsing, validating, and exporting GPX 1.1 files.

HavenGPXParser reads, validates, and writes GPX 1.1 files in Swift. It uses stream-based parsing to keep memory use low and includes MapKit integration for showing routes and waypoints.


Features

Stream-based parsing

Uses SAX parsing so large GPX files do not fill up memory.

Validation

Checks documents against the GPX 1.1 standard and reports clear errors when something is wrong.

MapKit integration

Comes with SwiftUI views for drawing tracks and waypoints on a map.

Export

Builds GPX documents in code and writes them as properly formatted XML.

Security

Guards against XML attacks with limits on entity expansion, nesting depth, and file size.


Platforms

iOS 26+, macOS 26+, tvOS 26+, watchOS 26+, visionOS 26+


Licence

BSD 3-Clause