Open sco1 opened 8 years ago
The [Content_Types].xml
file located in the root of the *.mlapp
contains a reference to the MATLAB code published with the app:
<Default ContentType="application/vnd.mathworks.matlab.code.document+xml;plaincode=true" Extension="xml"/>
This can be parsed to robustly obtain the filename(s) of the MATLAB code utilized by the app, which can be fed into a searching function to obtain the filepath(s).
Mitigated for MATLAB versions newer than R2014b, see #8 and f986a72, which eliminates the intermediate *.zip
unpacking step.
The current
fopen
call for parsing the XML file assumes a consistent name & location:Though this is consistent across tested
*.mlapp
examples this is not a robust approach and also does not account for the potential for multiple XML files in the published app.