Page 1 of 1

[Confirmed] CintaNotes may hang while importing XML

Posted: Wed Jun 17, 2009 11:27 am
by ale
Hello Alex,
I was trying to fix and import the XML code in this topic: viewtopic.php?f=3&t=181, at first it was not well formed but after solving that I still had problems, I found CN can't import XML like in the test case below. Please, before importing, add a space before </note>. It seems CN doesn't like leading whitespace, so without a space before </note> it will work ok, with a space it will be not responsive during import and after some time I had to terminate CN with Task Manager

Code: Select all

<?xml version="1.0"?>
<notebook>
<note title="" date="2009-06-17" time="12:00:00" source="" link="" tags="">
<![CDATA[hello]]>
</note>
</notebook>

I also had problems with the encoding, now I have two dozens of XML files on the desktop and and I have a bit lost myself :) so I'll ask directly. What Unicode encoding does CN want for importing and does it look for a BOM at the beginning of the file? It seemed to me it wants UTF-16 with a little endian BOM at the beginning but I would like to see a confirmation. Will other flavours like UTF-8 work?

I also found the minimal XML it will accept it's like in the example I wrote, it requires non empty values for date and time. I think the requirement for the encoding and an example of the minimal working XML note might be written somewhere on the forum or in the FAQ

Re: CintaNotes may hang while importing XML

Posted: Wed Jun 17, 2009 12:14 pm
by toddclausen
I can't reproduce this can you give some more info on what you are clipping from (I tried Notepad and PSPad and they worked) and open progs, etc?

EDIT - Oops, not sure why it worked at first, now it doesn't - I confirm this bug...

Re: CintaNotes may hang while importing XML

Posted: Wed Jun 17, 2009 1:11 pm
by kranor
Yup confirmed a space in front of </note> will cause Cintanotes to hang.

Re: CintaNotes may hang while importing XML

Posted: Thu Jun 18, 2009 5:37 am
by CintaNotes Developer
Thanks for bringing this up folks. Well, what can I say: XML support in CintaNotes is now just enough to read back the files generated by export.
The encoding used is a big-endian UCS-2 (basically UTF-16 without surrogate pairs).
I will address this issue in (or maybe shortly after) Beta M10 via using a lightweight open-source XML parser instead of current dead simple regular expression-based implementation.

Re: CintaNotes may hang while importing XML

Posted: Thu Jun 18, 2009 11:05 am
by Midas
CintaNotes Developer wrote:Thanks for bringing this up folks. Well, what can I say: XML support in CintaNotes is now just enough to read back the files generated by export.
The encoding used is a big-endian UCS-2 (basically UTF-16 without surrogate pairs).
I will address this issue in (or maybe shortly after) Beta M10 via using a lightweight open-source XML parser instead of current dead simple regular expression-based implementation.

Take your time, but could you elaborate a little about why you prefered UCS-2 over UTF-8, for instance? In layman's terms, if you please... ;)

Re: [Open] CintaNotes may hang while importing XML

Posted: Thu Jun 18, 2009 8:02 pm
by ale
Alex take care of this as and when you see fit, there's really no hurry. I think we have a safe way to import XML, we just need to create one note, export it and then replicate that structure X times with our data :)