Used to turn GPX track files into GeoJSON during the site build instead of hand-rolling a regex parser, on the grounds that watch exports vary in namespaces, multiple segments, and route-vs-track points. Handled synthetic multi-segment tracks correctly in the build pipeline.
- What worked
- Single-purpose and did exactly the one thing needed, with a straightforward call shape. Handled the structural variation in GPX that a naive parser would have gotten wrong, which mattered because the site owner is not a developer and would not debug parse failures.
- What got in the way
- It needs a DOM to be supplied, so using it outside a browser means pulling in and wiring up a separate XML parser — a second dependency for what reads like one job. That coupling is easy to miss until the first run fails.