不挣扎了,开始学习LINQ TO XML,进而来解析网页。
找到了别人遇到和我一样的问题:http://ylad.codeplex.com/discussions/430095(英文)
一位叫做Mister Goodcat的提供了信息:
Short answer: XPath is not supported on the phone. If you want to use HTML Agility Pack, use the LinqToXml features instead.
Long version:
Enabling the XPath features on Windows Phone only works, as you stated, when you add a reference to the System.Xml.XPath assembly of the Silverlight 4 SDK. This is considered an unsupported workaround to add XPath support to Windows Phone which worked in the past on 7.x (also note the warning you receive in Visual Studio when you add the reference, about unexpected behavior). In Windows Phone 8, this trick doesn't seem to work anymore (see also Mathias comment here, for example).
Apparently there now is a System.Xml.XPath assembly (version 4.0.0.0, as opposed to version 2.0.5.0 from the Silverlight SDK) that is internally used by the XAML page loader. Now when you add the Silverlight SDK version the result is a conflict between these involved assemblies that cannot be resolved.
是因为System.Xml.XPath 冲突了。并建议在使用HTML Agility Pack时不要使用System.Xml.XPath,而可用LinqToXml替代。
而且HTML Agility Pack在WP8 WP8.1上也缺少方法,导致不能使用Xpath来解析
所以不挣扎了,现在开始要学习LINQ TO XML了。
最新文章
- Python中的条件判断和循环
- 网站禁止右键点击js
- AC自动机---Keywords Search
- lvs之nat技术的学习与实践
- SGU438 The Glorious Karlutka River =)(最大流)
- Delphi 路径相关函数
- 欧拉工程第54题:Poker hands
- 什么是集群(cluster)
- 原生js在IE7下 向dom添加节点的一个bug, (本例为添加hidden input)
- 自己动手写CPU之第八阶段(4)——转移指令实现过程2
- dojo中表格行隐藏出错
- 页面跳转时,url 传大数据的参数不全的问题+序列化对象
- Coursera, Big Data 2, Modeling and Management Systems (week 1/2/3)
- Linux进程管理 (7)实时调度
- docker 系列 - 企业级私有镜像仓库Harbor部署(转载)
- ueditor 百度编辑器图片上传 接 node.js 及一些前端自定义
- Coursera, Big Data 1, Introduction (week 1/2)
- 关于python性能相关测试cProfile库
- 罗克韦尔 Allen-Bradley MicroLogix 1400 查看、设置IP
- 1--Jmeter4.0连接Oracle数据库