C#后台解析XML字符串并获取节点值

XmlDocument xDoc = new XmlDocument();
                xDoc.LoadXml(System.Web.HttpUtility.UrlDecode(mCuTable.DATASOURCE));

                sDataSourceName = xDoc.SelectNodes("datasource/dataset")[0].Attributes["id"].Value;
                sDatasetType = xDoc.SelectNodes("datasource/dataset")[0].Attributes["type"].Value;
View Code
posted @ 2015-08-25 16:49  Tz__C  阅读(1905)  评论(1编辑  收藏  举报