title: How to get the innerText of an element with SimpleXml
body: <p>I'm still fairly new with SimpleXml. What I'm trying to do:</p>
  
  <p>I have many xml-files, which are build about the same. My problem is that sometimes there are more nodes in my target node. Example (trying to get body):</p>
  
  <p>xml-file 1</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;note&gt;
  &lt;firstname&gt;My name is WHAT&lt;/firstname&gt;
  &lt;lastname&gt;My name is WHO&lt;/lastname&gt;
  &lt;body&gt;My name is CHIKA CHIKA Slim-Shady&lt;/body&gt;
  &lt;/note&gt;
  </code></pre>
  
  <p>xml-file 2</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;note&gt;
  &lt;firstname&gt;My name is WHAT&lt;/firstname&gt;
  &lt;lastname&gt;My name is WHO&lt;/lastname&gt;
  &lt;body&gt;&lt;b&gt;My name is CHIKA CHIKA Slim-Shady&lt;/b&gt;&lt;/body&gt;
  &lt;/note&gt;
  </code></pre>
  
  <p>I can get the text in the first file with no problem:</p>
  
  <pre><code>$xml = simplexml_load_file("filename.xml");
  echo $xml-&gt;note-&gt;body;
  </code></pre>
  
  <p>But when I try to do the same in the second file I get nothing back.</p>
  
  <p>How can I get php to only spit out the text in a node, without regard to any additional nodes within the target node?</p>