importing from excel, handmade xml question

Problems ? Get help here!
Post Reply
roger
Posts: 39
Joined: Mon Sep 13, 2010 3:48 pm
Dive Computer: sensus ultra

importing from excel, handmade xml question

Post by roger »

After years of keeping dives in a lot of notebooks and a lot of computers, I moved it all over to excel. Now I'd like to move it all to macdive, and I tried using xml. I copied the divelog syntax, I think, and added columns to excel with the xml tags. Then I export from excel as csv, get rid of the comments, add a few lines for a header, and.... it should work but it doesn't. I get nothing but a bunch of 0 depth 0 time dives, all done on 1/1/2, with a new computer for every one.

I'm now working with just a single dive so it's not too messy. This is my xml. Can anyone see a problem? Do I need a more complete set of tags, even for fields that are blank?

thanks in advance.

Code: Select all

<dives>
    <units>Imperial</units>
    <schema>2.0.0</schema>
	<dive>
		<date>1989-02-19</date>
		<maxdepth>20</maxdepth>
		<duration>32</duration>
		<country>USA</country>
		<location>California</location>
		<site>Corona Del Mar</site>
		<buddies>
			<buddy>Rusty</buddy>
		</buddies>
		<boat>Beach</boat>
		<tags>
			<tag>Class</tag>
		</tags>
	</dive>
</dives>
User avatar
nick
Site Admin
Posts: 4363
Joined: Sat Apr 12, 2008 8:33 am
Dive Computer: Shearwater Teric
Contact:

Re: importing from excel, handmade xml question

Post by nick »

This looks like the format MacDive exports, which it won't currently import (it's on the todo list, but the format wasn't intended to be used for re-importing data).

You need to use a supported import format, like DiveLog's XML or UDCF.
roger
Posts: 39
Joined: Mon Sep 13, 2010 3:48 pm
Dive Computer: sensus ultra

Re: importing from excel, handmade xml question

Post by roger »

ah, I assumed all xml was the same. thanks. Yeah, I used an exported xml to learn the syntax. I tried the same with a sample udcf file, but it didn't have some fields, like tags. Thanks!
Post Reply