我有一堆这些 XML 文件,我想读取它们并将数据存储在 SQL 表中。读取/解析 XML 文件的最佳方法是什么?我正在使用 ASP.NET 4.0 和 SQL Server 2008。我非常擅长 C#/VB 和 asp.net,但对 XML 没有太多经验。基本上这些都是多项选择题,并且有答案。任何帮助将不胜感激。谢谢你。
<assessmentItem xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p0 imsqti_v2p0.xsd" identifier="choice" adaptive="false" timeDependent="false" title="001157" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
<correctResponse>
<value>A</value>
</correctResponse>
</responseDeclaration>
<outcomeDeclaration identifier="SCORE" cardinality="single" baseType="integer">
<defaultValue>
<value>0</value>
</defaultValue>
</outcomeDeclaration>
<stylesheet href="stylesheet/scip.css" type="text/css" />
<itemBody>
<span class="class1">
<b>Nick had eight marbles. He found four more.<br />
<br />
</b>
</span>
<div class="class2">
<span class="class1">
<b>
<img src="images/41047.jpg" alt="" />
</b>
</span>
</div>
<span class="class1">
<b>How many marbles does Nick have now?</b>
</span>
<choiceInteraction responseIdentifier="RESPONSE" shuffle="false" maxChoices="1">
<simpleChoice identifier="A">
<span class="class1">12</span>
<rubricBlock>
<span class="class1" >
<b>Correct</b>
</span>
</rubricBlock>
</simpleChoice>
<simpleChoice identifier="B">
<span class="class1">8</span>
<rubricBlock>
<span class="class1" >Chose a number from the stem</span>
</rubricBlock>
</simpleChoice>
<simpleChoice identifier="C">
<span class="class1">4</span>
<rubricBlock>
<span class="class1" >Subtracted</span>
</rubricBlock>
</simpleChoice>
</choiceInteraction>
</itemBody>
<responseProcessing template="http://www.imsglobal.org/question/qti_v2p0/rptemplates/match_correct" />
</assessmentItem>