title: Xquery get value from attribute
body: <p>I have some xml and need to extract values using sql</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;  
  &lt;fields&gt;  
  
  &lt;field name="fld_AccomAttic"&gt;  
  &lt;value&gt;0&lt;/value&gt;  
  &lt;/field&gt;  
  &lt;field name="fld_AccomBathroom"&gt;  
  &lt;value&gt;1&lt;/value&gt;  
  &lt;/field&gt;
  &lt;/fields&gt;  
  
  &lt;/xml&gt;
  </code></pre>
  
  <p>I need to get 
  column name 
  fld_AccomAttic<br>
  Value 
  1</p>
  
  <p>The xml is held in a sql server 2005 db</p>
  
  <p>I have used xquery before and it has worked.</p>
  
  <p>How to extract these values?</p>