MATLAB使用XSD解析和存储XML [英] MATLAB parse and store XML with XSD

查看:171
本文介绍了MATLAB使用XSD解析和存储XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XML文件的XSD,我希望它可以使解析和存储XML信息变得更加容易.但是,我无法在Mathworks网站上找到任何有关此类事情的信息.有谁知道使用我的XSD读取XML文件(如果可能的话,可以使用MATLAB)并存储XML文件中包含的信息的方法?另外,还有其他方法可以做到这一点(即没有MATLAB)吗?

I have an XSD for an XML file, which I was hoping would make it easier to parse and store the information in the XML. However, I am unable to find anything on the Mathworks website about such a thing. Does anyone know of a way to use my XSD to read the XML file (with MATLAB, if possible) and store the information contained in the XML file? Alternatively, is there some other way to do this (ie without MATLAB)?

推荐答案

看,我已经尝试了多个选项来读取/写入XML文件.当我告诉您时,请相信我,他们都不如您想象的那样好!

Look, I've tried multiple options to read/write XML files. And believe me when I tell you, all of them are not as good as you might think!

我最终达到并使用的最佳解决方案是使用

The best solution I've reached and used finally, is to use JAXB to create your parser java classes from XSD, then include your java package into Matlab and use it.

这篇关于MATLAB使用XSD解析和存储XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆