How to read large XML datafiles?

11 views (last 30 days)
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?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Jun 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.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!