title: Returning a concatenated string of property values for multiple nodes using XPath
body: <p>I'm working on a C project using libxml2.</p>
  
  <p>I keep an XML document of the following form:</p>
  
  <pre><code>&lt;?xml version="1.0"&gt;
  &lt;rootnode version="1.0"&gt;
      &lt;rootchild attribute1="a" attribute2="12345678" /&gt;
      &lt;rootchild attribute1="b" attribute2="ABCDEFGH" /&gt;
  &lt;/rootnode&gt;
  </code></pre>
  
  <p>I'd like to get a string of concatenated attribute2 values with a comma as delimiter, so for the example above the string would be: <code>"12345678,ABCDEFGH"</code></p>
  
  <p>I'd like to get as close to that string as possible using XPath. So far the best I can do is get the nodes using the following expression: <code>/rootnode/rootchild/attribute::attribute2</code></p>
  
  <p>Wrapping the above with a <code>string()</code> seems to return only the first attribute2 value.</p>
  
  <ol>
  <li>Is it possible to get more than one attribute2 value using a <code>string()</code> function?</li>
  <li>Is it possible to concatenate several values separated by a delimiter using XPath?</li>
  </ol>