[Import] my own xml : uid field?

nikhilsheth
Posts: 6
Joined: Wed Sep 18, 2013 1:44 pm
Contact:

[Import] my own xml : uid field?

Postby nikhilsheth » Wed Sep 18, 2013 2:50 pm

Hi,
I want to use CN as a portable file manager/catalog. I'm able to put "..\filename.ext" in the link field and when I browse link, the file is executed. Thumbs up on that. (the files are located one dir level above the application)

Now, I have 500+ files. Want to hack-design a .xml with a separate note for each file and then import the .xml. I can manage most of the fields, but am confused by this:

Code: Select all

<note uid="ddbeaef0-e558-46ac-8855-d4aa486ed028"...

Can I just use any ad-hoc uid? Can I use the same, or blank, uid with all the notes? (will CN auto-detect and assign a fresh one during the import? That would make my job much much easier!)

If I have to be systematic about it, what are the rules? non-repeating hex string with 8-4-4-4-12 chars? Or can I just assign some incrementing number of my choosing?
Mark S.
Posts: 81
Joined: Thu Aug 09, 2012 3:39 pm
Contact:

Re: [Import] my own xml : uid field?

Postby Mark S. » Fri Sep 20, 2013 3:56 pm

When I made my calendar files, I ignored the UID completely. I think (and you can test this premise) if the UID is missing CN will create one as items are imported.

I suspect that the UID's are important if you create a data set where items are cross-linked with each other.

You should be able to test this: Import some XML file information, and then export it and see what CN did with the UID field.

Mark
Arseniy (CN Support)
Moderator
Posts: 61
Joined: Wed Jul 10, 2013 2:33 am

Re: [Import] my own xml : uid field?

Postby Arseniy (CN Support) » Fri Sep 20, 2013 4:59 pm

Hello nikhilsheth!

nikhilsheth wrote:but am confused by this:
Code:
<note uid="ddbeaef0-e558-46ac-8855-d4aa486ed028"...


Uid is just internal note metadata which you can simply ignore as Mark S. said - it's made to allow linking to notes for Simplenote because it doesn't support note links.
Without these Uids note links would get broken when you sync down from Simplenote into a new CN notebook.
Since version 2.2 these uid fields are included only in the notes which are actual note link targets.

Thanks!

--
Best regards,
Arseniy Slavschik
CintaNotes Support Team
-----------------------------------------------------------------
nikhilsheth
Posts: 6
Joined: Wed Sep 18, 2013 1:44 pm
Contact:

Re: [Import] my own xml : uid field?

Postby nikhilsheth » Sun Oct 20, 2013 7:54 am

Hi, thanks for the clarifications.

I've run into a problem I cannot explain. It seems that CN is not importing files that were not created by it.

I exported some notes into an XML. Then copy-pasted the xml contents to a fresh empty xml file. And imported it to a fresh empty CN.

It doesn't do the import, and displays a popup error message saying "Notebook node not found".
I tried attaching the file, but xml or txts are not allowed to upload here it seems.
Arseniy (CN Support)
Moderator
Posts: 61
Joined: Wed Jul 10, 2013 2:33 am

Re: [Import] my own xml : uid field?

Postby Arseniy (CN Support) » Sun Oct 20, 2013 12:21 pm

Hello nikhilsheth!

Arseniy (CN Support) wrote:It doesn't do the import, and displays a popup error message saying "Notebook node not found".



The most possible reason of this message is wrong encoding - it must be UTF-16 LE.
To get the encoding right, you can for example paste this data into Notepad
and save with "Unicode" encoding.
I've successfully imported unicode .XML file created in Notepad from the CintaNotes pattern template without the message "Notebook node not found".

Thanks!

-----------
Best regards,
Arseniy Slavschik, CintaNotes Support Team.
nikhilsheth
Posts: 6
Joined: Wed Sep 18, 2013 1:44 pm
Contact:

Re: [Import] my own xml : uid field?

Postby nikhilsheth » Sun Oct 20, 2013 12:57 pm

Thanks Arseniy, that solved it!
I now cut out the uid fields and imported notes successfully. Local portable tag-based files management system coming right up!
Arseniy (CN Support)
Moderator
Posts: 61
Joined: Wed Jul 10, 2013 2:33 am

Re: [Import] my own xml : uid field?

Postby Arseniy (CN Support) » Sun Oct 20, 2013 3:05 pm

nikhilsheth wrote:Thanks Arseniy, that solved it!
I now cut out the uid fields and imported notes successfully. Local portable tag-based files management system coming right up!


Glad to hear it helps!

-----------
Best regards,
Arseniy Slavschik, CintaNotes Support Team.

Return to “CintaNotes Personal Notes Manager”