【发布时间】:2011-02-17 02:37:45
【问题描述】:
我有这个代码...
<td class="alt1" id="td_threadtitle_335784">
<td class="alt1" id="td_threadtitle_342222">
<td class="alt1" id="td_threadtitle_554213">
<td class="alt1" id="td_threadtitle_31226">
<td class="alt1" id="td_threadtitle_9442">
问题是……
如何使用 selectnodes 或其他功能来选择 ID...
我试试-
foreach (HtmlNode n in doc.DocumentNode.SelectNodes("//a[@id='td_threadtitle_']"))
但是最后的数字是$%@# Everthing...
[]的
【问题讨论】:
-
你能解释一下你的问题吗?你想选择什么? “td_threadtitle_335784”,“td_threadtitle_342222”,...?还是只有数字?
标签: html-agility-pack nodes selectnodes