title: Extract keys and values from XML in a SQL Server stored procedure
body: <p>I receive XML data like</p>
  
  <pre><code>&lt;t&gt;
    &lt;ID&gt;8&lt;/ID&gt;
    &lt;FirstName&gt;name 8&lt;/FirstName&gt;
    &lt;LastName&gt;surname 8&lt;/LastName&gt;
    &lt;DateOfBirth&gt;1963-05-23T00:00:00&lt;/DateOfBirth&gt;
  &lt;/t&gt;
  </code></pre>
  
  <p>In a SQL Server stored procedure. There are different xml data formats (the field numbers and field names can differ). Now, I should extract each field and it value and insert each field/value as a separate record in a table. </p>
  
  <p>Are there examples how I can do this with TSQL?</p>