I am interested in getting items into my SRS with as little effort as possible. Every minute wasted inputting data is a minute that could have otherwise been used to learn more. I am creating templates to make JGloss (a program to add Furigana and definitions to Japanese text semi-automatically) export directly to Supermemo XML format. It can be a bitch because Supermemo gives no info why an XML file will not import when import fails. Here are some details I needed in the process:
Supermemo 2006 XML Format
I have experimentally determined that the files attached below are the MINIMUM of data needed for Supermemo 2006 to import one Question and Answer without any errors into a named folder. The text file can be in plain ASCII for English. If you want another language, the text file can be in UTF-8, UTF-16 little or big, or ASCII + Decimal NCR format. I recommend Babelpad for conversion, though notepad can save to UTF-8. The attached UTF-8, UTF-16, and NCR samples files have Japanese and Chinese text in them.
If you try to import to a template with text elements, you will get scrambled characters. You must import to a template with two html elements, one marked as the answer. (You can also 'apply' such a template after importing and the scrambled characters will be fixed.) If you do not set the template as an 'Item' template (leave it as a 'Topic' template) then you will probably have a problem -- so double check that if no Question or Answer contents shows up.
IF YOU WANT TO PUT HTML CODE BETWEEN THE <QUESTION></QUESTION> OR <ANSWER></ANSWER> TAGS, the HTML must be encoded! Plain HTML will interfere with Supermemo's XML parsing and the import will fail.
If you have any problems, my recommendations are as follows:
1. Create a brand new collection and brand new blank item. From the tool bar add two HTML elements to a blank Item (if there were any fields already on it, delete them) and then set one as the answer. Save this as the Default template and also name it. If import XML works in a new collection, you have deduced the problem lies somewhere in your existing collection.
2. Try importing all of the different sample files below. If even ASCII won't work, the problem is not Chinese or Japanese.
Sample XML files: ASCII (UTF-8) | UTF-8 | UTF-16 LE | UTF-16 BE | ASCII and Decimal NCR (UTF-8)
Supermemo CE XML Format
The minimum XML file required to import into Supermemo CE is a bit simpler as the ID element is not required. (That means you can get by without any programming -- just make a header XML, footer XML, several element XML's and then copy header.xml+1.xml+2.xml+footer.xml output.xml.) There is also no need for a extra outer topic element to create a folder as Supermemo CE is flat anyhow.
My experimentation shows: perfect results from English only (ASCII) and from Decimal NCR format when using Chinese/Japanese or a mix thereof. If there is ENCODED HTML between the answer or question tags, it will work properly if you tick the "HTML" box from in SM CE Mode menu. Results with HTML were ugly as hell though (terrible font) and there is NO SUPPORT for RUBY tags.
Sample XML files that work: ASCII (UTF-8) | ASCII and Decimal NCR (UTF-8)

