Reading XML files in matlab

Reading XML files in MATLAB has yet to become user friendly as it already is in other object-oriented programming languages. The most confusing thing is that objects appear to be empty or NULL when you access variables in MATLAB. So I decided to put up a simple code example that summarizes the basic functions.

The XML document contains four types of objects over three levels of nesting.


->Journal
---> Entry
------> Time
------> Line

The code reads through a small XML file and prints information about time and line for each entry within the journal element.

Download
Reading XML files from MATLAB

No Comments

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Code examples
Live digital donation signature wall (source code included)

I was recently involved in an non-profit related event, where guests could participate in a lottery and win prices. To make the event more interesting, when someone either digitally or physically donated money, their name would appear/update on a large TV-screen. If they had already donated money, their name would …

Code examples
Reading large CSV files with MATLAB

Reading very large CSV files in MATLAB can be extremely slow and may even cause MATLAB to freeze or crash. A few weeks ago I was trying to read a CSV file of ~300MB, and it took forever to load although I have a fairly good laptop (i7-3537U, 8GB RAM, …