将XML嵌套到DataSet中

时间:2011-05-18 08:05:14

标签: asp.net xml dataset

如何将以下嵌套XML加载到DataSet中?

 <Response>
  <Request>
    <Origin>NYK</Origin>
    <Destination>TOK</Destination>
  </Request>
  <Depart>
    <Fare>
      <Chargeable>
        <BaseFare>100</BaseFare>
        <Tax>10</Tax>
      </Chargeable>
      <Nonchargeable>
        <Charge>10</Charge>
        <Add>15</Add>
      </Nonchargeable>
    </Fare>
  </Depart>
</Response>

1 个答案:

答案 0 :(得分:0)

您可以将XDocument用于读取xml,

http://www.xmlplease.com/read-xml-linq