title: simplexml get node value without typecasting
body: <p>Is there any way to get a node value from a <code>simplexml</code> object <strong>without</strong> casting it? </p>
  
  <pre><code>$amount = (int)$item-&gt;amount;
  </code></pre>
  
  <p>This is not very beautiful in my opinion, I'm searching for a cleaner way but did not find anything so far! </p>
  
  <pre><code>//wouldn't this be nice?
  $amount = $item-&gt;amount-&gt;getValue();
  </code></pre>
  
  <p>Thanks in advance.</p>