Import .lss

More
7 months 3 weeks ago - 7 months 3 weeks ago #192336 by litotes
Import .lss was created by litotes
Hi guys,

I love working with Limesurvey (I am using Version 3.17.3+190429)
and have already made several surveys.

However, this time I have to customize the XML of an LSS.

Example: I have 20 words as answer options in one question and want to create 30 surveys or
30 variants of this question, each time with a different set of 20 words.
So my first question is: is that possible to do within Limesurvey?
I guess not without much manual input, thus my more important second question:

1. I make my survey and export it as .lss. I can re-import it just fine, even if the same survey exists. New ID is created.
2. I change my words in the XML (with R) and save the .lss.
3. I get the error message upon importing:
"It is not a valid Limesurvey-XML-file. Cannot import survey."
In German: "Diese Datei ist keine gültige LimeSurvey-Umfrage-XML Datei. Import fehlgeschlagen."

I tried to change the <sid> fields and the title in R. Did not work.
I tried to just export the .lss and and re-import it. Worked.
I tried to manually edit one word in Notepad++. Worked.

So, what do I have to do that Limesurvey accepts my new .lss file?
Anything to do with my importing it in R?

I attach both the working version and the not working version ("doesnotwork.lss").

Thank you very much for your help!

Ulrich
Attachments:
Last edit: 7 months 3 weeks ago by litotes. Reason: Second attachment

Please Log in to join the conversation.

LimeSurvey Partners
More
7 months 3 weeks ago #192338 by Joffm
Replied by Joffm on topic Import .lss
If it is only to change these 20 words, just copy the survey 30 times inside LimeSurvey.
Here you are free to set the survey title and a survey ID.
Then change your words in these new created surveys.
In my opinion the best option.

Other option: export to *.txt, open in EXCEl or OpenOffice, change and import the *.txt again

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
7 months 3 weeks ago #192339 by litotes
Replied by litotes on topic Import .lss
Thanks for the fast reply!
However, that does not help. I have > 1000 words from which I sample.
These will go in several rounds of different surveys... Too much to do manually.

Please Log in to join the conversation.

More
7 months 3 weeks ago - 7 months 3 weeks ago #192340 by Joffm
Replied by Joffm on topic Import .lss

Anything to do with my importing it in R?

Did you really compare the two files in a text editor (like notepad++)?
Then you would have seen the quotes (probably added by R).

The first line of your "doesnotwork.lss": "<?xml version=""1.0"" encoding=""UTF-8""?>"
The first line of your "working survey.lss":<?xml version="1.0" encoding="UTF-8"?>

Remove the quotes and everything is fine.

Joffm

BTW: There are much more quotes in the lss file, which you have to remove.
<gid><![CDATA[48]]></gid>
<sid><![CDATA[93232]]></sid>
<group_name><![CDATA[Einordnen von Verben in eine Hierarchie]]></group_name>
<group_order><![CDATA[2]]></group_order>
"<description><![CDATA[<p>Deine Aufgabe ist es, die folgenden Verben in eine Reihenfolge zu bringen  - von allgemein, abstrakt und breit anwendbar zu speziell, unwichtig und eng.</p>"
""
<p>Es gelten die vorhin genannten 2 Merkmale:</p>
""
"<p>1. Allgemeinheit (= es gibt viele Unterkonzepte, z. B. drehen, laufen, springen zum Oberkonzept bewegen)</p>"
""
"<p>2. Breite Anwendbarkeit (das Verb lässt sich mit vielen Substantiven aus verschiedenen Bereichen (z. B. Tieren, Dingen, Ereignissen, usw.) sinnvoll kombinieren.</p>"
""
<p>Beispiele für die Ebenen:</p>
""
"<p>Ebene ""Sehr allgemein oder allgemein"" => bewegen</p>"
""
"<p>Ebene ""Relativ allgemein""                       => springen</p>"
""
"<p>Ebene ""Speziell""                                     => herunterspringen</p>"
]]></description>
<language><![CDATA[de-informal]]></language>


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 months 3 weeks ago by Joffm.

Please Log in to join the conversation.

More
7 months 3 weeks ago #192341 by litotes
Replied by litotes on topic Import .lss
Hi Joffm,

thanks - that was it!
After some hours of re-importing (also without quotes) I found that it works only if
a) no quotation marks are there
b) first line is the xml header
c) the double quotation marks inside the first line have to removed, too.
For all R users that may read this - just add quote=FALSE, row.names = FALSE at the end of write.table when saving the survey.

Thank you!!

Ulrich

Please Log in to join the conversation.

More
7 months 3 weeks ago #192344 by gabrieljenik
Replied by gabrieljenik on topic Import .lss
For a prior customer, have done a development based on Excel for a very similar situation. He was able to choose the words on excel abd surveys were created automatically.

Please contact me at This email address is being protected from spambots. You need JavaScript enabled to view it. if need some help.

Thanks

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

Please Log in to join the conversation.

More
1 month 1 week ago #202078 by jochenmeiners
Replied by jochenmeiners on topic Import .lss
I found your answer to the export/ import question and thought you might be able to solve my problem. These are not my own questinaires, but I was asked because I do create the users on our limesurvey installation at oldenburg university.


I do get the error message for every exported survey, when trying to import it again: Fehler

"Diese Datei ist keine gültige LimeSurvey-Umfrage-XML Datei. Import fehlgeschlagen."

What is wrong with the export files:
Attachments:

Please Log in to join the conversation.

More
1 month 1 week ago #202118 by holch
Replied by holch on topic Import .lss
Without having looked at the files yet, what is the version of...

a. the limesurvey installation these come from?
b. the limesurvey installtion these fail to be imported?

My guess: Export form LS 4.x into LS 3.x...

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
1 month 1 week ago #202119 by holch
Replied by holch on topic Import .lss
Just did a quick test, at least the first LSS file can not be imported in 3.x nor in 4.x.

Do they come straight out of Limesurvey or have they been tinkert with in a text editor?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
1 month 1 week ago #202124 by jochenmeiners
Replied by jochenmeiners on topic Import .lss
The questionaires came direct from LimeSurvey and were imported without manipulating. But this morning we didt an update: "Die Datenbank wurde von Version 356 auf Version 359 aktualisiert." Now it works. Thank you for looking at my question.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now