Renoise 2.8.0B8 Doc:load_From Fails

If I run this function

  
function hello()  
 local doc = renoise.Document.create("Test3"){}  
 local foo, err = doc:load_from("/tmp/Song.xml")  
 print(err)  
end  
  

I get an error:

  
 '/tmp/Song.xml' was saved with an incompatible, more recent version of Renoise.  
  

Is it a bug? Maybe there is a better approach?

Wanted to mention that I have tried changing the default

  
<renoisesong doc_version="37"><br>
<br>```

<br>
in Song.xml to a lower version numbers, but<br>
the console it still shows the same error.<br>
<br>
Same thing for &lt;PlaybackEngineVersion&gt;</renoisesong>

renoise.Documents from XML will NOT create new object models from the source XML files, but will only assign existing corresponding values in your document object. In other words: Only a “RenoiseSong” document can load RenoiseSong xml docs. See http://code.google.com/p/xrnx/source/browse/trunk/Documentation/Renoise.Document.API.lua#73 for more details please.

What you probably want is a generic XML unserializer for Lua?

Ah, I had missed that part. I saw in the documentation for

doc:load_from

that only existing properties would be added but I figured I could
compensate for that by adding the properties corresponding to the
ones I need from the Song.xml file. Thanks for the pointer.

I think I’ll have a look at some of the Lua Xml toolkits :slight_smile:

Ah, I found

Scripts/Libraries/renoise/http/xml.lua

Great!