title: extracting data from within xml files using MATLAB
body: <p>I am a complete programming beginner trying to learn MATLAB.  I want to extract numerical data from a bunch of different xml files.  The numerical data items are bounded by the tags  and .  How do I write a program in MATLAB?</p>
  
  <p>My algorithm:</p>
  
  <pre><code>1. Open the folder
  2. Look into each of 50 xml files, one at a time
  3. Where the tag &lt;HNB.1&gt;&lt;/HNB.1&gt; exists, copy numerical contents between said tag and write results into a new file
  4. The new file name given for step 3 should be the same as the initial file name read in Step 2, being appended with "_data extracted"
  </code></pre>
  
  <p>example:</p>
  
  <pre><code>FileName = Stewart.xml
  Contents = blah blah blah &lt;HNB.1&gt;2&lt;/HNB.1&gt; blah blah
  NewFileName = Stewart_data extracted.txt
  Contents = 2
  </code></pre>