title: Accessing data from .XML file with Matlab
body: <p>I've got a <strong>.XML</strong> file that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;dict&gt;
  &lt;key&gt;Comments&lt;/key&gt;
  &lt;string&gt;&lt;/string&gt;
  &lt;key&gt;DataSummary&lt;/key&gt;
  &lt;dict&gt;
      &lt;key&gt;AreaCM2&lt;/key&gt;
      &lt;real&gt;2.77&lt;/real&gt;
      &lt;key&gt;Dev&lt;/key&gt;
      &lt;real&gt;9.48&lt;/real&gt;
  &lt;/dict&gt;
  &lt;key&gt;DataValues&lt;/key&gt;
  &lt;array&gt;
      &lt;real&gt;81&lt;/real&gt;
      &lt;real&gt;85&lt;/real&gt;
  &lt;/array&gt;
  &lt;key&gt;ROIPoints&lt;/key&gt;
  &lt;array&gt;
      &lt;string&gt;{65.7414, 58.2929}&lt;/string&gt;
      &lt;string&gt;{65.7388, 58.4421}&lt;/string&gt;
  &lt;/array&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>I'd like to access <code>DataValues</code> and <code>ROIPoints</code> <strong><em>using MATLAB</em></strong>. </p>
  
  <p>I found quite a far fetched way of extracting <code>ROIPoints</code> which works like this:</p>
  
  <pre><code>DOMnode = xmlread(pathofxmlfile);
  i       = DOMnode.getDocumentElement;
  f       = char(i.getTextContent);
  </code></pre>
  
  <p><code>f</code> is a string containing all the "text" contents:    </p>
  
  <p><code>f = CommentsDataSummaryAreaCM22.77Dev9.48DataValues8185ROIPoints**{65.7414, 58.2929}{65.7388, 58.4421}</code></p>
  
  <p>Since <code>ROIPoints</code> are enclosed in curly brackets, I can manipulate the string in order to extract them.</p>
  
  <p>Unfortunately, <code>DataValues</code> get horizontally concatenated (8185) and I cant extract them individually.</p>
  
  <p>Any tips? </p>