title: XPath expression to get only the value of all the attributes
body: <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;bookstore&gt;
      &lt;book category="cooking"&gt;
          &lt;title lang="en"&gt;Everyday Italian&lt;/title&gt;
          &lt;author&gt;Giada De Laurentiis&lt;/author&gt;
          &lt;year&gt;2005&lt;/year&gt;
          &lt;price&gt;30.00&lt;/price&gt;
          &lt;location&gt;DL&lt;/location&gt;
      &lt;/book&gt;
      &lt;book category="children"&gt;
          &lt;title lang="es"&gt;Harry Potter&lt;/title&gt;
          &lt;author&gt;J K. Rowling&lt;/author&gt;
          &lt;year&gt;2005&lt;/year&gt;
          &lt;price&gt;29.99&lt;/price&gt;
          &lt;location&gt;UP&lt;/location&gt;
      &lt;/book&gt;
      &lt;book category="web"&gt;
          &lt;title lang="en"&gt;XQuery Kick Start&lt;/title&gt;
          &lt;author&gt;James McGovern&lt;/author&gt;
          &lt;author&gt;Per Bothner&lt;/author&gt;
          &lt;author&gt;Kurt Cagle&lt;/author&gt;
          &lt;author&gt;James Linn&lt;/author&gt;
          &lt;author&gt;Vaidyanathan Nagarajan&lt;/author&gt;
          &lt;year&gt;2003&lt;/year&gt;
          &lt;price&gt;49.99&lt;/price&gt;
          &lt;location&gt;  DL&lt;/location&gt;
      &lt;/book&gt;
      &lt;book category="web"&gt;
          &lt;title lang="en"&gt;Learning XML&lt;/title&gt;
          &lt;author&gt;Erik T. Ray&lt;/author&gt;
          &lt;year&gt;2003&lt;/year&gt;
          &lt;price&gt;39.95&lt;/price&gt;
          &lt;location&gt;dl &lt;/location&gt;
      &lt;/book&gt;
      &lt;category&gt;web&lt;/category&gt;
  &lt;/bookstore&gt;
  </code></pre>
  
  <p>XPath expression:</p>
  
  <p>string(/bookstore/book/@category)</p>
  
  <p>The above XPath expression is returning only the value of the first attribute under book element:</p>
  
  <p>cooking</p>
  
  <p>Expected output:</p>
  
  <p>cooking</p>
  
  <p>children</p>
  
  <p>web</p>
  
  <p>web</p>
  
  <p>I want my XPath expression to return the string value of all the attributes of book element. I referred several posts but I couldn't find onw in which I could get all the attribute values.</p>