title: How to get Matlab to read correct amount of xml nodes
body: <p>I'm reading a simple xml file using matlab's xmlread internal function.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;root&gt;
      &lt;ref&gt;
          &lt;requestor&gt;John Doe&lt;/requestor&gt;
          &lt;project&gt;X&lt;/project&gt;
      &lt;/ref&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>But when I call getChildren() of the <code>ref</code> element, it's telling me that it has <strong>5</strong> children.</p>
  
  <p><strong>It works fine IF</strong> I put all the XML in <strong>ONE line</strong>. Matlab tells me that <code>ref</code> element has <strong>2</strong> children.</p>
  
  <p>It doesn't seem to like the spaces between elements. </p>
  
  <p>Even if I run <em>Canonicalize</em> in oXygen XML editor, I still get the same results. Because Canonicalize still leaves spaces.</p>
  
  <p>Matlab uses java and xerces for xml stuff.</p>
  
  <h1>Question:</h1>
  
  <p>What can I do so that I can keep my xml file in human readable format (not all in one line) but still have matlab correctly parse it?</p>
  
  <h1>Code Update:</h1>
  
  <pre><code>filename='example01.xml';
  docNode = xmlread(filename);
  rootNode = docNode.getDocumentElement;
  entries = rootNode.getChildNodes;
  nEnt = entries.getLength
  </code></pre>