File Exchange

image thumbnail


version (12.2 KB) by Jan Hermann
MEX function converts an XML file into a MATLAB structure


Updated 12 Aug 2017

GitHub view license on GitHub

Being a C++ mex function, it is very fast compared to the built-in xmlread or any other pure matlab implementation. It can directly read n-dimensional arrays.
For details, see

Cite As

Jan Hermann (2020). xml2struct (, GitHub. Retrieved .

Comments and Ratings (5)

shunchao wu

this commit works with vs2010 and no boost needed. good.

Jan Hermann

sorry, I have never worked with matlab on windows

hi, can you please provide a Windows compiling instructions?

Jan Hermann

thanks, updated

should comment that is is only for *nix distributions that have boost installed


Removed dependency on Boost, refactored to C++11

Rapidxml is now downloaded during build

rewrote the array parsing, no specification provided, see example XML file

tags updated

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Inspired: maxsich/loadSPE