我想使用 dataset.readxml 从 xml 文件中检索一些数据。但是,我的 xml 格式不是很好的格式,一部分用于数据集,另一部分用于其他事物。所以,我如何检索数据集部分。我正在开发c#.net 2008.xml 文件格式如下。
<Object type="Sample">
<Object type="Tool">
<Property name="Text">Prescription1</Property>
<Property name="Name">Prescription1</Property>
<Object type="TextBox">
<Property name="Text">Singapore</Property>
<Property name="Name">TextBox2</Property>
</Object>
<DataSet> //This Part
<TableOne>
<ItemID>001</ItemID>
<ItemName>Item001</ItemName>
<Price>100</Price>
</TableOne>
<TableOne>
<ItemID>002</ItemID>
<ItemName>Item002</ItemName>
<Price>200</Price>
</TableOne>
</DataSet>
</Object>
问候
冲