title: Import 'xml' into Sql Server
body: <p>I have a file that is structured like so:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;EventSchedule&gt;
      &lt;Event Uid="2" Type="Main Event"&gt;
          &lt;IsFixed&gt;True&lt;/IsFixed&gt;
          &lt;EventKind&gt;MainEvent&lt;/EventKind&gt;
          &lt;Fields&gt;
              &lt;Parameter Name="Type" Value="TV_Show"/&gt;
              &lt;Parameter Name="Name" Value="The Muppets"/&gt;
              &lt;Parameter Name="Duration" Value="00:30:00"/&gt;
          &lt;/Fields&gt;
      &lt;/Event&gt;
      &lt;Event&gt;
      ...and so on
      &lt;/Event&gt;
  &lt;/EventSchedule&gt;
  </code></pre>
  
  <p>I'm not entirely sure if it is valid XML, however I need to import it into SQL Server but everything I try doesn't seem to work.</p>
  
  <p>Please could anyone point me in the right direction either with some example code or a recommendation on which method to use?</p>
  
  <p>I'd ideally like to get the raw data into a flat table, along the lines of:</p>
  
  <pre><code>Name        | Type    | Duration | EventKind
  
  The Muppets | TV_Show | 00:30:00 | MainEvent
  </code></pre>
  
  <p>Finally this is coming from fairly large files and I will need to import the regularly. </p>
  
  <p>Thanks, pugu</p>