我是一個帶有asp.net的nube。這是我想要實現的。我想將以下XML數據寫入sql server數據庫的單個表中。讀取多級XML並寫回單個數據庫表
- <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數據庫。 在此先感謝。
**你做了什麼?? ** –