【发布时间】:2011-08-30 12:29:29
【问题描述】:
我在 XPath 上完全是个菜鸟,我正在做从网站获取数据的应用程序,我需要找到 2 件事:
1- 所有以ctl00_Main_GridView_lieutenants开头的span标签
2-span上父标签的href.... errr..我会尽量解释:
<a href="something.html"><span id="ctl00_Main_GridView_lieutenants_ctl03_lbl_nick">Text</span></a>
我需要文本和链接;)
【问题讨论】:
-
你也可以考虑使用 jQuery(代替)
-
不使用 WebForms 的另一个理由...
标签: c# .net xml xpath html-agility-pack