title: How to query for an XML value, getting null
body: <p>I am trying to work with .rdl files to extract certain information.  I have tried this and am getting null as a result and cannot figure it out.  New to xml
  Here is the TSql:</p>
  
  <pre><code>DECLARE @xml xml   
  SET @xml= '&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"&gt;
    &lt;DataSets&gt;
      &lt;DataSet&gt;
        &lt;Query&gt;
          &lt;DataSourceName&gt;SyteLine&lt;/DataSourceName&gt;
          &lt;CommandType&gt;StoredProcedure&lt;/CommandType&gt;
          &lt;CommandText&gt;ItemABCAnalysisSp&lt;/CommandText&gt;
        &lt;/Query&gt;
      &lt;/DataSet&gt;
    &lt;/DataSets&gt;
  &lt;/Report&gt;'  
  
  DECLARE @Value nvarchar(100)
  SELECT  @xml.value('(/rd:Report/DataSets/DataSet/Query/CommandType)[1]', 'nvarchar(100)' )  
  </code></pre>