xml_io_tools

版本 1.13.0.0 (215.6 KB) 作者: Jaroslaw Tuszynski
Read XML files into MATLAB struct and writes MATLAB data types to XML
25.2K 次下载
更新时间 2010/11/5

查看许可证

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.

引用格式

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

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Structured Data and XML Documents 的更多信息
致谢

启发作品: xunit4

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
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.