Page 1 of 1

Editing osim files from matlab using xmliotools

Posted: Mon Aug 18, 2014 1:31 pm
by wanderto
Hi,

I am attempting to read, edit, and then write an OSIM file to a different location using Matlab. I am using the most current set of matlab pipeline tools with Matlab 2014a.

I am able to read in the osim file just fine, using

OpenSimDocument = xml_read('C:\Users\Engineer\Desktop\Knee OA OpenSim\Arnoldetal2010_2Legs_Default_v2.osim');

However, even when I make no changes to this structure, when I write the model, OpenSim 3.2 is no longer able to understand it. There is some kind of syntax error introduced and I cannot understand what has changed. This is the command I am using to write the OSIM file:

xml_write('newmodel.osim',OpenSimDocument);

I have read on other forums that there may have been some formatting changes to the OSIM file format and that the matlab functions I am calling may be expecting older versions of OSIM files?

Has anyone been able to get around this? I am using the default xml_write() engine which I think is the xerces engine.