如何C#解析xml格式字符串

[复制链接]
查看11 | 回复2 | 2013-5-24 14:43:53 | 显示全部楼层 |阅读模式
最前面:using System.Xml;代码:XmlDocument xdoc = new XmlDocument();xdoc.LoadXml(你那个字符串);string code = xdoc.DocumentElement.InnerText; //这货应该就是你要的0001234了...
回复

使用道具 举报

千问 | 2013-5-24 14:43:53 | 显示全部楼层
http://www.cnblogs.com/luckdv/articles/1728088.html?login=1建议使用linq to xml首先引入using System.Xml.Linq;然后在方法里 XElement root = XElement.Parse(@"0001234");s...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行