Skip to content
This repository has been archived by the owner on Nov 25, 2018. It is now read-only.

XML Parsing Assumes Static Location & Name #3

Open
sco1 opened this issue Mar 30, 2016 · 2 comments
Open

XML Parsing Assumes Static Location & Name #3

sco1 opened this issue Mar 30, 2016 · 2 comments

Comments

@sco1
Copy link
Member

sco1 commented Mar 30, 2016

The current fopen call for parsing the XML file assumes a consistent name & location:

~\matlab\document.xml

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.

@sco1 sco1 self-assigned this Mar 30, 2016
@sco1
Copy link
Member Author

sco1 commented Mar 30, 2016

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).

@sco1
Copy link
Member Author

sco1 commented May 4, 2016

Mitigated for MATLAB versions newer than R2014b, see #8 and f986a72, which eliminates the intermediate *.zip unpacking step.

@sco1 sco1 removed their assignment Apr 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant