title: How to get tag parameter value with XQuery
body: <p>For example i have this xml. I need to get value of parameter <code>val</code> of tag <code>foo</code> with <code>id="two"</code></p>
  
  <pre><code>&lt;top&gt;
      &lt;sub id="one"&gt;
          &lt;foo id="two" val="bar" /&gt;
          sometext
      &lt;/sub&gt;
  &lt;/top&gt;
  </code></pre>
  
  <p>Whis this query (using Qt QXmlQuery):</p>
  
  <pre><code>doc('test.xml')/top/sub[@id='one']/foo[@id='two']/&lt;p&gt;{@val}&lt;/p&gt;
  </code></pre>
  
  <p>I receive <code>&lt;p val="bar"/&gt;</code>, <strong>but I need only text "bar" without any tags</strong>.
  I tried to remove <code>&lt;p&gt;</code> and <code>&lt;/p&gt;</code> and receive <code>syntax error, unexpected {</code></p>
  
  <p><strong>How can i get parameter value without any tags?</strong></p>