Code covered by the BSD License  

Highlights from
Use Mac OS X XML Plists with MATLAB (Updated Version)

Be the first to rate this file! 22 Downloads (last 30 days) File Size: 46.1 KB File ID: #38138

Use Mac OS X XML Plists with MATLAB (Updated Version)

by

 

A updated version of that by John Iversen

| Watch this File

File Information
Description

These utilities enable the conversion of data written by programs on Mac OS X for use in MATLAB (and vice versa).

Anyone wanting to share data with programs written for Mac OS X can use these utilities to convert the native OS X storage format (XML Property List) to structures. XML Property Lists are the preferred textual representation of property list dictionaries.

These utilities convert from XML property list to a matlab structure and back, and include m-files for loading and saving XML property lists from matlab.

    XMLPlistToStruct
    structToXMLPlist

    loadXMLPlist
    saveXMLPlist

Info on OS X Property Lists: http://developer.apple.com/documentation/Cocoa/
Conceptual/PropertyLists/Concepts/XMLPListsConcept.html

John

Acknowledgements

Use Mac Os X Xml Plists With Matlab inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
16 Apr 2013 Pierre Gravel

Bonjour,

I like this function. It's quite useful indeed.

I have a problem however when I try compiling it. The compiler tells me that it does not accept cells. I can rewrite a more restricted version of the program without cells but there is still a compilation problem because there is a line in the code where the input xml (an mxArray) is indexed

tag = xml( (ibra(itag)+1):(iket(itag)-1) );

I get the message: Subscripting into an mxArray is not supported.

What can I do to fix the problem?

Pierre

06 Feb 2013 Simon

Great utility.

However, I get an error when trying to import a plist where the Root is an Array, and each item in the array is a Dict with three Numbers (x, y, z coordinates).

Error received:
Attempted to access arraylv(0); index must be a positive integer or logical.

Error in XMLPlistToStruct2 (line 112)
if arraylv(dictLevel) ==0

Error in loadXMLPlist (line 16)
[S KT]= XMLPlistToStruct2(text);

Contact us