title: SimpleXML, XPath: how to get content of element by unique id?
body: <p>kept trying for hours, brain messed up, need help:</p>
  
  <p>XML-file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;testresult&gt;
    &lt;body&gt;
      &lt;itemset name="sc"&gt;
        &lt;item name="1"&gt;1&lt;/item&gt;
        &lt;item name="2"&gt;3&lt;/item&gt;
        &lt;item name="3"&gt;0&lt;/item&gt;
      &lt;/itemset&gt;
    &lt;/body&gt;
  &lt;/testresult&gt;
  </code></pre>
  
  <p>Now I want to retrieve the content (<code>0</code>) of the item with the unique name "3" into <code>$value</code> ...</p>
  
  <pre><code>$value = $resultxml-&gt;xpath("//item[@name='$name']");
  </code></pre>
  
  <p>unfortunately not... what do I need to do to have <code>$value</code> to contain <code>0</code>?</p>