xml2struct

Convert an xml file into a MATLAB structure for easy access to the data.

You are now following this Submission

Convert an xml file into a MATLAB structure for easy access to the data.

Cite As

Wouter Falkena (2026). xml2struct (https://se.mathworks.com/matlabcentral/fileexchange/28518-xml2struct), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.8.0.0

Small bugfix in the CDATA and Comment structure fields.

1.7.0.0

Speed improvement due to X. Mo and added support for cdata and comments.

1.5.0.0

The function now replaces element and attribute names containing - by _dash_, . by _dot_ and : by _colon_

1.4.0.0

Attribute parsing speed increased by 40%

1.3.0.0

Corrected the uploaded file

1.2.0.0

Removed the assumption that the filename should have a '.xml' extension

1.1.0.0

Decreased the processing time for large XML files

1.0.0.0