title: How to get value of a node with namespace prefix
body: <p>So, I have got the following query that I tried to get the value between the nodes:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;oas:Base64Assertion&gt;235fkl53&lt;/oas:Base64Assertion&gt;
  </code></pre>
  <p>I want to extract the value <code>235fkl53</code>. I tried with the following query:</p>
  <pre><code>declare @x xml = '
    &lt;soapenv:Header&gt;
      &lt;oas:Security&gt;
        &lt;oas:Base64Assertion&gt;
          &lt;oas:Security xmlns:oas=&quot;http://example.com&quot;&gt;
            &lt;oas:Base64Assertion&gt;235fkl53&lt;/oas:Base64Assertion&gt;
          &lt;/oas:Security&gt;
        &lt;/oas:Base64Assertion&gt;
      &lt;/oas:Security&gt;
    &lt;/soapenv:Header&gt;
  ';
  
  select cast(@x.value('(//oas:Base64Assertion)[1]', 'nvarchar(max)') as xml).query('//value/text()') as cdata;
  </code></pre>
  <p>But I get the following error:</p>
  <blockquote>
  <p>Msg 2229, Level 16, State 1, Line 13 XQuery [value()]: The name &quot;oas&quot;
  does not denote a namespace.</p>
  </blockquote>
  <p>Any tips on how to achieve this?</p>