title: SQL table key value pairs to a XML
body: <p>I have a data table as follows</p>
  
  <pre>
  ID      Key     Value
  --------------------------
  1       F1      2
  2       F2      5
  3       F3      1
  </pre>
  
  <p>Using a TSQL in SQL server 2005, how can I convert this to a XML as</p>
  
  <pre><code>&lt;Values&gt;
    &lt;F1&gt;2&lt;/F1&gt;
    &lt;F2&gt;5&lt;/F2&gt;
    &lt;F3&gt;1&lt;/F3&gt;
  &lt;/Values&gt;
  </code></pre>
  
  <p>Please help.</p>