http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 3892|回复: 3

[C#语言基础] 新人读取XML问题求救!

[复制链接]
发表于 2013-5-16 04:44:22 | 显示全部楼层 |阅读模式
<?xml version="1.0" encoding="UTF-8"?>
-<xml>
<row opentime="2013-5-14 0:05:00" opencode="7,0,2,9,3" expect="130514001"/>
<row opentime="2013-5-14 0:10:00" opencode="9,2,5,2,5" expect="130514002"/>
<row opentime="2013-5-14 0:15:00" opencode="2,5,4,6,0" expect="130514003"/>
<row opentime="2013-5-14 0:20:00" opencode="5,1,8,8,2" expect="130514004"/>
<row opentime="2013-5-14 0:25:00" opencode="6,8,0,2,2" expect="130514005"/>
<row opentime="2013-5-14 0:30:00" opencode="0,6,0,5,9" expect="130514006"/>
<row opentime="2013-5-14 0:35:00" opencode="0,1,6,3,8" expect="130514007"/>
<row opentime="2013-5-14 0:40:00" opencode="7,6,9,5,4" expect="130514008"/>
<row opentime="2013-5-14 0:45:00" opencode="4,1,8,6,9" expect="130514009"/>
<row opentime="2013-5-14 0:50:00" opencode="0,2,9,3,8" expect="130514010"/>
<row opentime="2013-5-14 0:55:00" opencode="1,0,9,3,0" expect="130514011"/>
<row opentime="2013-5-14 1:00:00" opencode="4,8,2,7,7" expect="130514012"/>
<row opentime="2013-5-14 1:05:00" opencode="0,4,1,8,8" expect="130514013"/>
<row opentime="2013-5-14 1:10:00" opencode="9,7,3,7,3" expect="130514014"/>
<row opentime="2013-5-14 1:15:00" opencode="7,8,3,3,1" expect="130514015"/>
<row opentime="2013-5-14 1:20:00" opencode="5,2,2,7,4" expect="130514016"/>
<row opentime="2013-5-14 1:25:00" opencode="3,6,5,9,2" expect="130514017"/>
<row opentime="2013-5-14 1:30:00" opencode="3,1,1,4,2" expect="130514018"/>
<row opentime="2013-5-14 1:35:00" opencode="0,0,8,3,9" expect="130514019"/>
<row opentime="2013-5-14 1:40:00" opencode="7,2,8,6,1" expect="130514020"/>
<row opentime="2013-5-14 1:45:00" opencode="0,0,2,2,8" expect="130514021"/>
<row opentime="2013-5-14 1:50:00" opencode="5,2,1,6,8" expect="130514022"/>
<row opentime="2013-5-14 1:55:00" opencode="4,7,8,0,4" expect="130514023"/>
<row opentime="2013-5-14 10:00:00" opencode="1,1,9,8,7" expect="130514024"/>
<row opentime="2013-5-14 10:10:00" opencode="3,4,5,2,0" expect="130514025"/>
<row opentime="2013-5-14 10:20:00" opencode="7,0,2,8,1" expect="130514026"/>
<row opentime="2013-5-14 10:30:00" opencode="2,9,0,3,6" expect="130514027"/>
<row opentime="2013-5-14 10:40:00" opencode="8,4,0,5,2" expect="130514028"/>
<row opentime="2013-5-14 10:50:00" opencode="6,5,2,9,8" expect="130514029"/>
<row opentime="2013-5-14 11:00:00" opencode="8,4,5,4,2" expect="130514030"/>
<row opentime="2013-5-14 11:10:00" opencode="2,7,9,0,2" expect="130514031"/>
<row opentime="2013-5-14 11:20:00" opencode="0,4,2,9,1" expect="130514032"/>
<row opentime="2013-5-14 11:30:00" opencode="7,8,7,8,4" expect="130514033"/>
<row opentime="2013-5-14 11:40:00" opencode="0,4,4,3,0" expect="130514034"/>
<row opentime="2013-5-14 11:50:00" opencode="6,7,6,0,4" expect="130514035"/>
<row opentime="2013-5-14 12:00:00" opencode="1,8,8,5,9" expect="130514036"/>
<row opentime="2013-5-14 12:10:00" opencode="8,0,6,5,5" expect="130514037"/>
<row opentime="2013-5-14 12:20:00" opencode="5,5,6,3,5" expect="130514038"/>
<row opentime="2013-5-14 12:30:00" opencode="7,6,8,8,9" expect="130514039"/>
<row opentime="2013-5-14 12:40:00" opencode="7,8,6,1,5" expect="130514040"/>
<row opentime="2013-5-14 12:50:00" opencode="1,7,3,6,9" expect="130514041"/>
<row opentime="2013-5-14 13:00:00" opencode="9,1,2,9,0" expect="130514042"/>
<row opentime="2013-5-14 13:10:00" opencode="0,5,8,5,1" expect="130514043"/>
<row opentime="2013-5-14 13:20:00" opencode="1,8,6,1,8" expect="130514044"/>
<row opentime="2013-5-14 13:30:00" opencode="6,6,5,2,1" expect="130514045"/>
<row opentime="2013-5-14 13:40:00" opencode="8,8,6,3,8" expect="130514046"/>
<row opentime="2013-5-14 13:50:00" opencode="3,8,5,9,8" expect="130514047"/>
<row opentime="2013-5-14 14:00:00" opencode="9,1,5,6,0" expect="130514048"/>
<row opentime="2013-5-14 14:10:00" opencode="8,6,3,5,8" expect="130514049"/>
<row opentime="2013-5-14 14:20:00" opencode="1,5,7,8,2" expect="130514050"/>
<row opentime="2013-5-14 14:30:00" opencode="4,9,1,1,0" expect="130514051"/>
<row opentime="2013-5-14 14:40:00" opencode="1,5,0,5,7" expect="130514052"/>
<row opentime="2013-5-14 14:50:00" opencode="0,0,5,7,3" expect="130514053"/>
<row opentime="2013-5-14 15:00:00" opencode="9,6,8,3,4" expect="130514054"/>
<row opentime="2013-5-14 15:10:00" opencode="7,4,9,6,0" expect="130514055"/>
<row opentime="2013-5-14 15:20:00" opencode="2,9,1,6,9" expect="130514056"/>
<row opentime="2013-5-14 15:30:00" opencode="4,7,0,2,8" expect="130514057"/>
<row opentime="2013-5-14 15:40:00" opencode="3,3,6,3,7" expect="130514058"/>
<row opentime="2013-5-14 15:50:00" opencode="0,0,9,0,6" expect="130514059"/>
<row opentime="2013-5-14 16:00:00" opencode="2,1,8,4,2" expect="130514060"/>
<row opentime="2013-5-14 16:10:00" opencode="4,0,2,6,8" expect="130514061"/>
<row opentime="2013-5-14 16:20:00" opencode="5,4,3,7,9" expect="130514062"/>
<row opentime="2013-5-14 16:30:00" opencode="5,8,0,0,9" expect="130514063"/>
<row opentime="2013-5-14 16:40:00" opencode="6,9,1,4,2" expect="130514064"/>
<row opentime="2013-5-14 16:50:00" opencode="2,0,1,4,8" expect="130514065"/>
<row opentime="2013-5-14 17:00:00" opencode="4,3,4,6,2" expect="130514066"/>
<row opentime="2013-5-14 17:10:00" opencode="6,9,4,1,2" expect="130514067"/>
<row opentime="2013-5-14 17:20:00" opencode="3,9,1,5,0" expect="130514068"/>
<row opentime="2013-5-14 17:30:00" opencode="7,0,4,7,8" expect="130514069"/>
<row opentime="2013-5-14 17:40:00" opencode="3,0,3,0,0" expect="130514070"/>
<row opentime="2013-5-14 17:50:00" opencode="1,5,3,8,9" expect="130514071"/>
<row opentime="2013-5-14 18:00:00" opencode="3,4,4,6,8" expect="130514072"/>
<row opentime="2013-5-14 18:10:00" opencode="7,8,8,5,3" expect="130514073"/>
<row opentime="2013-5-14 18:20:00" opencode="4,3,4,3,4" expect="130514074"/>
<row opentime="2013-5-14 18:30:00" opencode="0,2,1,0,8" expect="130514075"/>
<row opentime="2013-5-14 18:40:00" opencode="0,0,9,0,9" expect="130514076"/>
<row opentime="2013-5-14 18:50:00" opencode="2,4,3,9,4" expect="130514077"/>
<row opentime="2013-5-14 19:00:00" opencode="2,3,0,4,3" expect="130514078"/>
<row opentime="2013-5-14 19:10:00" opencode="7,0,7,0,0" expect="130514079"/>
<row opentime="2013-5-14 19:20:00" opencode="1,8,7,9,2" expect="130514080"/>
<row opentime="2013-5-14 19:30:00" opencode="3,6,1,4,5" expect="130514081"/>
<row opentime="2013-5-14 19:40:00" opencode="4,3,0,0,4" expect="130514082"/>
<row opentime="2013-5-14 19:50:00" opencode="3,2,7,4,0" expect="130514083"/>
<row opentime="2013-5-14 20:00:00" opencode="2,5,9,9,4" expect="130514084"/>
<row opentime="2013-5-14 20:10:00" opencode="5,8,1,7,7" expect="130514085"/>
<row opentime="2013-5-14 20:20:00" opencode="1,3,7,5,7" expect="130514086"/>
<row opentime="2013-5-14 20:30:00" opencode="3,1,8,0,3" expect="130514087"/>
<row opentime="2013-5-14 20:40:00" opencode="6,0,7,9,8" expect="130514088"/>
<row opentime="2013-5-14 20:50:00" opencode="2,1,6,4,9" expect="130514089"/>
<row opentime="2013-5-14 21:00:00" opencode="6,1,1,7,6" expect="130514090"/>
<row opentime="2013-5-14 21:10:00" opencode="7,3,4,3,7" expect="130514091"/>
<row opentime="2013-5-14 21:20:00" opencode="1,3,6,5,4" expect="130514092"/>
<row opentime="2013-5-14 21:30:00" opencode="1,9,5,9,1" expect="130514093"/>
<row opentime="2013-5-14 21:40:00" opencode="8,9,8,9,6" expect="130514094"/>
<row opentime="2013-5-14 21:50:00" opencode="0,8,9,7,0" expect="130514095"/>
<row opentime="2013-5-14 22:00:00" opencode="8,9,2,4,7" expect="130514096"/>
<row opentime="2013-5-14 22:05:00" opencode="6,6,8,1,4" expect="130514097"/>
<row opentime="2013-5-14 22:10:00" opencode="9,4,1,7,5" expect="130514098"/>
<row opentime="2013-5-14 22:15:00" opencode="1,1,8,3,0" expect="130514099"/>
<row opentime="2013-5-14 22:20:00" opencode="5,6,8,9,0" expect="130514100"/>
<row opentime="2013-5-14 22:25:00" opencode="2,2,8,3,8" expect="130514101"/>
<row opentime="2013-5-14 22:30:00" opencode="0,3,5,5,9" expect="130514102"/>
<row opentime="2013-5-14 22:35:00" opencode="8,0,8,7,7" expect="130514103"/>
<row opentime="2013-5-14 22:40:00" opencode="8,3,0,8,0" expect="130514104"/>
<row opentime="2013-5-14 22:45:00" opencode="8,4,9,6,4" expect="130514105"/>
<row opentime="2013-5-14 22:50:00" opencode="7,3,0,2,3" expect="130514106"/>
<row opentime="2013-5-14 22:55:00" opencode="5,9,6,5,6" expect="130514107"/>
<row opentime="2013-5-14 23:00:00" opencode="8,7,4,5,8" expect="130514108"/>
<row opentime="2013-5-14 23:05:00" opencode="1,3,6,5,8" expect="130514109"/>
<row opentime="2013-5-14 23:10:00" opencode="1,8,1,4,0" expect="130514110"/>
<row opentime="2013-5-14 23:15:00" opencode="7,8,6,0,7" expect="130514111"/>
<row opentime="2013-5-14 23:20:00" opencode="1,1,7,9,8" expect="130514112"/>
<row opentime="2013-5-14 23:25:00" opencode="1,0,4,2,2" expect="130514113"/>
<row opentime="2013-5-14 23:30:00" opencode="3,0,4,3,5" expect="130514114"/>
<row opentime="2013-5-14 23:35:00" opencode="0,1,1,4,9" expect="130514115"/>
<row opentime="2013-5-14 23:40:00" opencode="8,5,3,4,8" expect="130514116"/>
<row opentime="2013-5-14 23:45:00" opencode="3,1,2,4,4" expect="130514117"/>
<row opentime="2013-5-14 23:50:00" opencode="6,2,4,1,6" expect="130514118"/>
<row opentime="2013-5-14 23:55:00" opencode="4,9,4,0,2" expect="130514119"/>
<row opentime="2013-5-15 0:00:00" opencode="5,8,5,6,9" expect="130514120"/>
</xml>



以上是XML格式文本,

我想取出所有 opentime,opencode,expect 的值,但是我是新手,XML还是第一次用,完全没有头绪,

希望论坛的各位朋友帮忙写个例子! 在下感激不尽!


1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2013-5-16 07:54:38 | 显示全部楼层
发表于 2013-5-16 08:18:49 | 显示全部楼层
用对象 XmlDocument
 楼主| 发表于 2013-5-16 10:02:56 | 显示全部楼层
QQ图片20130516100210.jpg

已经解决,需要的朋友可以参考一下~

(还是MSDN好用啊~)
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-12-19 08:21

© 2014-2021

快速回复 返回顶部 返回列表