我是asp.net 的nube。这就是我想要达到的目标。我想将以下 XML 数据写入 sql server 数据库中的单个表中。
- <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">
- <Race RaceNo="7" RaceTime="2012-05-16T16:36:00" CloseTime="2012-05-16T16:40:08.107" RaceName="F&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">
- <TipsterTip TipsterId="0" Tips="1">
<Tipster TipsterName="LATE MAIL" />
</TipsterTip>
- <TipsterTip TipsterId="1" Tips="8-5-3-7">
<Tipster TipsterName="RADIO TAB" />
</TipsterTip>
- <TipsterTip TipsterId="2" Tips="1-10-9-2">
<Tipster TipsterName="KEVIN CASEY" />
</TipsterTip>
- <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">
- <Dividend DivId="62406790" DivAmount="80.8000">
<DivResult LegNo="1" RunnerNo="7" />
<DivResult LegNo="2" RunnerNo="5" />
</Dividend>
</Pool>
- <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">
- <Dividend DivId="62406797" DivAmount="10828.0000">
<DivResult LegNo="1" RunnerNo="7" />
<DivResult LegNo="2" RunnerNo="5" />
<DivResult LegNo="3" RunnerNo="13" />
<DivResult LegNo="4" RunnerNo="1" />
</Dividend>
</Pool>
- <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">
- <Dividend DivId="62406785" DivAmount="68.5000">
<DivResult LegNo="1" RunnerNo="5" />
<DivResult LegNo="2" RunnerNo="7" />
</Dividend>
</Pool>
</Race>
</Meeting>
</RaceDay>
有人可以告诉我如何读取我的 xml 文件并将数据展平并将其插入到 sql 数据库中的合适表中。提前致谢。