xml_io_tools

Read XML files into MATLAB struct and writes MATLAB data types to XML
25,4K Downloads
Aktualisiert 5. Nov 2010

Lizenz anzeigen

Read XML files into MATLAB struct and writes MATLAB data types to XML files, with help of simple interface to MATLAB's xmlwrite and xmlread functions.

Two function to simplify reading and writing XML files from MATLAB:

* Function xml_read first calls MATLAB's xmlread function and than converts its output ('Document Object Model' tree of Java objects) to tree of MATLAB struct's. The output is often in format of nested structs and cells. In the output data structure field names are based on XML tags.

* Function xml_write first convert input tree of MATLAB structs and cells and other types to tree of 'Document Object Model' nodes, and then writes resulting object to XML file using MATLAB's xmlwrite function.

This package can:
* Read any XML file, possibly created outside of MATLAB, and convert it to MATLAB data structures.
* Write any MATLAB's struct tree to XML file
* Handle XML attributes and special XML nodes like comments, processing instructions and CDATA sections
* Supports base64 encoding and decoding to allow handling embeded binary data
* Be studied, modified, customized, rewritten and used in other packages without any limitations. All code is included and documented. Software is distributed under BSD License (included).

This package can't:
* Guarantee to recover the same Matlab objects that were saved. If you need to be able to recover carbon copy of the structure that was saved than you will have to use one of the packages that uses special set of tags saved as xml attributes that help to guide the parsing of XML code. This package does not do that.
* Guarantee to work with MATLAB versions older than the package (2006/11). The code does not work with older versions of MATLAB.

Zitieren als

Jaroslaw Tuszynski (2024). xml_io_tools (https://www.mathworks.com/matlabcentral/fileexchange/12907-xml_io_tools), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2010a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Structured Data and XML Documents finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert: xunit4

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.13.0.0

Fix problem with empty cells reported by Richard Cotton; fixed issues with reading boolean arrays reported by Zohar Bar-Yehuda; Improved speed of base64 coding and decoding by switching to java based code.