title: Read multi level XML in and write back to single data base table
body: <p>I'm a nube with asp.net.  This is what I'm trying to achieve.  I want to write the following XML data into a single table in a sql server database.</p>
  
  <pre><code>- &lt;RaceDay RaceDayDate="2012-05-16T00:00:00" Year="2012" Month="5" Day="16" DayOfTheWeek="Wednesday" MonthLong="May" IsCurrentDay="1" IsPresaleMeeting="0" ServerTime="2012-05-16T16:47:30.033"&gt;
  - &lt;Race RaceNo="7" RaceTime="2012-05-16T16:36:00" CloseTime="2012-05-16T16:40:08.107" RaceName="F&amp;M BM 70 HANDICAP" Distance="1200" SubFav="1" RaceDisplayStatus="PAYING" WeatherChanged="N" WeatherCond="1" WeatherDesc="Fine" TrackChanged="N" TrackCond="1" TrackDesc="Good" TrackRating="3" TrackRatingChanged="N"&gt;
  - &lt;TipsterTip TipsterId="0" Tips="1"&gt;
    &lt;Tipster TipsterName="LATE MAIL" /&gt; 
    &lt;/TipsterTip&gt;
  - &lt;TipsterTip TipsterId="1" Tips="8-5-3-7"&gt;
    &lt;Tipster TipsterName="RADIO TAB" /&gt; 
    &lt;/TipsterTip&gt;
  - &lt;TipsterTip TipsterId="2" Tips="1-10-9-2"&gt;
    &lt;Tipster TipsterName="KEVIN CASEY" /&gt; 
    &lt;/TipsterTip&gt;
  - &lt;Pool PoolType="EX" Available="Y" Abandoned="N" PoolDisplayStatus="PAYING" PoolTotal="3734.00" JPotInGross="0.00" JPotOutGross="0.00" LastCalcTime="2012-05-16T16:36:57" CalcTime="2012-05-16T16:41:31" StatDiv="0"&gt;
  - &lt;Dividend DivId="62406790" DivAmount="80.8000"&gt;
    &lt;DivResult LegNo="1" RunnerNo="7" /&gt; 
    &lt;DivResult LegNo="2" RunnerNo="5" /&gt; 
    &lt;/Dividend&gt;
    &lt;/Pool&gt;
  - &lt;Pool PoolType="F4" Available="Y" Abandoned="N" PoolDisplayStatus="PAYING" PoolTotal="3492.00" JPotInGross="0.00" JPotOutGross="1397.16" LastCalcTime="2012-05-16T16:36:57" CalcTime="2012-05-16T16:41:31" StatDiv="0"&gt;
  - &lt;Dividend DivId="62406797" DivAmount="10828.0000"&gt;
    &lt;DivResult LegNo="1" RunnerNo="7" /&gt; 
    &lt;DivResult LegNo="2" RunnerNo="5" /&gt; 
    &lt;DivResult LegNo="3" RunnerNo="13" /&gt; 
    &lt;DivResult LegNo="4" RunnerNo="1" /&gt; 
    &lt;/Dividend&gt;
    &lt;/Pool&gt;
  - &lt;Pool PoolType="QN" Available="Y" Abandoned="N" PoolDisplayStatus="PAYING" PoolTotal="7029.00" JPotInGross="0.00" JPotOutGross="0.00" LastCalcTime="2012-05-16T16:36:57" CalcTime="2012-05-16T16:41:31" StatDiv="0"&gt;
  - &lt;Dividend DivId="62406785" DivAmount="68.5000"&gt;
    &lt;DivResult LegNo="1" RunnerNo="5" /&gt; 
    &lt;DivResult LegNo="2" RunnerNo="7" /&gt; 
    &lt;/Dividend&gt;
    &lt;/Pool&gt;
    &lt;/Race&gt;
    &lt;/Meeting&gt;
    &lt;/RaceDay&gt;
  </code></pre>
  
  <p>Can someone please show me how to read in my xml file and flatten out the data and insert it into a suitable table in the sql database.
  Thanks in advance.</p>