问题
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)?
回答1:
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.
回答2:
See this: http://www.artefact.tk/software/matlab/xml/
That should help you!
来源:https://stackoverflow.com/questions/13963236/matlab-parse-and-store-xml-with-xsd