Import binary dumps

Markus Koppenberger koppi at action.at
Tue Mar 19 11:44:14 PDT 2013


On 19/03/2013, at 3:40 PM, Linus Torvalds wrote:

> On Tue, Mar 19, 2013 at 4:30 AM, Koppi <koppi at action.at> wrote:
>> 
>> I was also trying to import the XML produced by the "universal" binary of libdivecomputer, but it would fail.
>> Maybe I should have a look if I can transform the XML to a subsurface compatible format.
> 
> Hmm. The libdivecomputer universal xml very much used to be something
> we imported (it was how I imported some of my older dives).
> 
> But the "universal xml" that libdivecomputer outputs is actually
> invalid XML. So one thing that you need to do is to make the ldc xml
> be "proper" xml, by surrounding it with a root node (otherwise you'll
> have multiple "dive" nodes at the root level, and libxml will refuse
> to even start parsing it).
> 
> So you need to edit the ldx xml to make it valid, the easiest approach
> is to just put a <ldcdives> line at the beginning and a </ldcdives> at
> the end.
> 
> That should get you a reasonable import. No guarantees that it imports
> everything, but it should get you the basics.
> 
>                Linus

Thanks for this tip, import of the modified XML worked perfectly for me!

koppi
 


More information about the subsurface mailing list