Options for importing dive sites from XML into Subsurface

Doug Junkins douglas.junkins at gmail.com
Sun Apr 14 09:43:33 PDT 2019

I’ve been looking at the code to try to figure out the best way to add the capability to import an XML file of dive sites to the Subsurface dive site table. Looking at the existing dive log import code, it may be possible to simply modify the dive log import code to be able to process an XML file that only includes dive sites.

This would involve modifying the ‘process_imported_dives’ function in core/divelist.c to not filter sites that are not used by the imported dives and to process files even if the number of imported dives is zero. This would keep the XML import code consolidated in one place, but it would blur the separation of dive processing and dive site processing that we are trying to create.

The other alternative is to replicate the ‘process_imported_dives’ function as something like ‘process_imported_divesites’ in core/divesites.c and add a new, separate menu option to import dive site XML files, but then there a lot of duplicate code to maintain.

Any input would be appreciated.


More information about the subsurface mailing list