gpx
gpx copied to clipboard
adding to the namespace for output files
HI
I am still fiddling with getting data out of the Garmin extension files and I have come across an issue where some other software is refusing to read GPX files with the garmin extension unless the proper xmlns headers are present so I have been cutting and pasting them in with an editor.
I have been looking at the gpx_file code and it looks like I should be able to pass these in as an option when creating the output object but I can't figure out exactly how.
Garmin headers define the following additional ns: xmlns:gpxx, xmlns:wptx1, xmlns:gpxtpx along with a long list of urls for the locations.
Any hints appreciated
After a bit more pondering I think I need to do something like
gpx_out[f] = GPX::GPXFile.new( :namespace_defs => '...' )
where '...' is the list of additional stuff I want. What I can't figure out is what format the data should be. It is picked apart in attributes_and_nsdefs_as_gpx_attributes
but that seems to assume it is parsed xml?
Hi @rful011 - tell me a little more about which headers you need? If we understand the problem you're up against, that might help us come to a better solution.