Speed up parsing of large grids from XML file into MATLAB

I am working with an executable that uses XML files for the inputs and generates an XML output. One of the elements in my output is a grid of points, and it is stored in a file I will call Results.xml, along with other additional information. I currently have a MATLAB script that wraps around this executable and automates it, allowing me to set-up runs of thousands of cases, hit go and let it run. It generates csv versions of the grids and other data, as well as measuring contours of equal values on the grid.
My problem is this. I potentially have to run this code for thousands of cases, but currently it takes approximately 6 minutes per case. The majority of this time (~4-minutes) is taken up by MATLAB parsing the grid. I need to parse the grid, because I am generating half-grids, and then in MATLAB I am mirroring the grids (since the full grid is symmetric about the X-axis) and then using the contour function to plot and measure the contour areas, max lengths, and max widths. Is there a faster way to parse this grid?
Currently, the method we are using is to access the element using getElementsbyTagName, then we access the attributes using getAttribute, turning that attribute into a string using the char() function. Then we use the sscanf(val,%d) to get the double. This is done for every point on the grid, and these grids are very large. Any help would be much appreciated.
I saw some forums on the XML Toolbox, which is what it sounds like I need, but all of the comments I saw said it doesn't work for later versions of MATLAB, and I am using MATLAB 2010b.

Antworten (0)

Produkte

Gefragt:

am 9 Mai 2013

Community Treasure Hunt

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

Start Hunting!

Translated by