title: Getting value from SimpleXMLElement Object
body: <p>Hi I have this following segment of XML:</p>
  
  <pre><code>......
              &lt;Result number="4" position="1" points="25"&gt;
                  &lt;Driver driverId="button" url="http://en.wikipedia.org/wiki/Jenson_Button"&gt;
                      &lt;GivenName&gt;Jenson&lt;/GivenName&gt;
                      &lt;FamilyName&gt;Button&lt;/FamilyName&gt;
                      &lt;DateOfBirth&gt;1980-01-19&lt;/DateOfBirth&gt;
                      &lt;Nationality&gt;British&lt;/Nationality&gt;
                  &lt;/Driver&gt;
  ......
  </code></pre>
  
  <p>I can use the following easily to get the GivenName:</p>
  
  <pre><code>$item-&gt;Driver-&gt;GivenName;
  </code></pre>
  
  <p>But when I use:</p>
  
  <pre><code>$item-&gt;Driver-&gt;FamilyName;
  </code></pre>
  
  <p>I get SimpleXMLElement Object ()</p>
  
  <p>I have looked around and found that it might be something to do with passing it to a string but then I get nothing on screen. Not even SimpleXMLElement Object. </p>
  
  <p>I don't understand as it's a sibling of GivenName and that works.</p>