title: XPath - array to string conversion error
body: <p>I'm using <code>simplexml_load_string</code> to load some XML:</p>
  
  <pre><code>$xml = "&lt;payment&gt;&lt;cardHolderName&gt;&lt;![CDATA[John Smith]]&gt;&lt;/cardHolderName&gt;&lt;/payment&gt;";
  $xml = simplexml_load_string($xml, null, LIBXML_NOCDATA);
  </code></pre>
  
  <p>How can I then access the cardHolderName (John Smith) using xpath? I've tried:</p>
  
  <pre><code>$name = $xml-&gt;xpath('/payment/cardHolderName');
  echo $name;
  </code></pre>
  
  <p>But the value is empty and I get a warning:</p>
  
  <blockquote>
    <p>Array to string conversion</p>
  </blockquote>
  
  <p>Same result with all of these xpaths:</p>
  
  <pre><code>'/payment/cardHolderName'
  '/payment/cardHolderName[1]'
  '/payment/cardHolderName/text()'
  '/payment/cardHolderName[1]/text()'
  </code></pre>
  
  <p>Thanks in advance.</p>