title: Database table to XML document?
body: <p>Basically I have a asp.net that I need to display an XML document (straight xml, with the tree nodes) I have the sql statement which returns the row names and each one of their values.  Just wondering how I should go about doing this?</p>
  
  <p>SQL Server 2008, my query is just a select * from offices, my results is "1","New York","New York City","555-5555" I would like the output to be </p>
  
  <pre><code>&lt;item id="1"&gt; 
  &lt;state&gt;New York&lt;/state&gt; 
  &lt;city&gt;New York City&lt;/city&gt; 
  &lt;phone&gt;555-5555&lt;/phone&gt; 
  &lt;/item&gt; 
  </code></pre>
  
  <p>where state/city/phone is the column name, and the value is the value of that column </p>