How to read large XML datafiles?

11 vues (au cours des 30 derniers jours)
MathWorks Support Team
MathWorks Support Team le 17 Juin 2021
My data is in the form of XML files, which I would like to evaluate with MATLAB R2021a. The sizes of the single files are up to 60GB. Using
 readstruct('Case1.res', "FileType", "xml");
I can import these files into MATLAB. 
Unfortunately, if the input file is greater than 2GB MATLAB reports the file to be faulty. Is there a way to resolve this issue?

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 17 Juin 2021
As of MATLAB R2021a, this is currently not possible using 'readstruct' or 'readtable'.
However, if you are using MATLAB R2021a, you can use the MATLAB API for XML Processing (MAXP). Here's a doc link:
Note that this will require some more code to work with than 'readstruct', but there is no 2GB limit.

Plus de réponses (0)

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by