title: how to read this xml in sql server
body: <p>I am having xml as result for webservice api . i need to parse the result and update to database table. my xml is below . it is a response text.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; 
  &lt;double&gt;1&lt;/double&gt;
  </code></pre>
  
  <p>Sqlserver 2008 Code :</p>
  
  <pre><code>    declare @xml xml, @rate DECIMAL(10,4)
    set @xml=REPLACE(@ResponseText ,'encoding="utf-8"','')
    select @rate= @xml.value('(/double)[1]','decimal')
  </code></pre>
  
  <p>I want to get the value of double but it always return the null .</p>
  
  <p>Please help me out .</p>
  
  <p>Hi , have Done changes as per your suggestion still no getting.</p>
  
  <pre><code> declare @xml XML
   DECLARE @responsetext VARCHAR(900)
  
   declare @rate DECIMAL(10,4)
   SET @responsetext = '&lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;double xmlns="http://www.webserviceX.NET/"&gt;1&lt;/double&gt;'
   set @xml=REPLACE(@ResponseText ,'encoding="utf-8"','')
   select @rate= @xml.value('(/double)[1]','decimal')
   select @rate
  </code></pre>