首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

要求用DataSet获取xml节点的值?该怎么解决

2012-02-26 
要求用DataSet获取xml节点的值??????xmlversion 1.0 standalone yes ?customergoocost 150.0

要求用DataSet获取xml节点的值?????
<?xml   version= "1.0 "   standalone= "yes "   ?>
<customer>
<goo   cost= "150.0000 "   date= "2007-3-16   8:13:30 "   />
<info> aa </info>
</customer>

怎么获得info节点的值,,只能使用dataset。

[解决办法]
DataSet ds = new DataSet();
ds.ReadXml(file);
DataTable dt = ds.Tables[ "customer "];
MessageBox.Show(dt.Rows[0][ "info "].ToString());

热点排行