One of the reasons for XMLREAD to fail when reading large files could be the lack of enough Java Heap Memory. The amount of Java Heap memory available to MATLAB can be increased and this can be done in the following way, in the MATLAB Desktop Window:
For versions of MATLAB R2010a and above use -
File -> Preferences -> General -> Java Heap Memory.
Move the slider to a desirable location.
For versions of MATLAB prior to R2010a, refer to the link below-
<http://www.mathworks.com/support/solutions/en/data/1-18I2C>
Best Answer