title: creating XML from SQL TABLE with column patterns
body: <p>I have a table with columns below,</p>
  
  <pre><code>SALES_ORDERS.ORDER_SLIP.NUMBER|SALES_ORDERS.ORDER_SLIP.DATE|SALES_ORDERS.ORDER_SLIP.ARP_CODE
  </code></pre>
  
  <p>and the XML output I need to have is like below</p>
  
  <pre><code>&lt;SALES_ORDERS&gt;
    &lt;ORDER_SLIP&gt;
      &lt;NUMBER&gt;TEST&lt;/NUMBER&gt;
      &lt;DATE&gt;02.09.2014&lt;/DATE&gt;
      &lt;ARP_CODE&gt;CARI1&lt;/ARP_CODE&gt;
    &lt;/ORDER_SLIP&gt;
  &lt;/SALES_ORDERS&gt;
  </code></pre>
  
  <p>I need to create the xml according to column name which include full path way from the top.</p>
  
  <p>How can I achive such an XML file from such a table? I can use LINQ if it is necessary but I am not sure how to do it?</p>