我正在尝试使用 HAP 访问带有前缀的标签,但以下内容不起作用(它们不返回任何内容):
HtmlAgilityPack.HtmlNodeCollection nodes = document.DocumentNode.SelectNodes("//*[name() ='sc:xslfile']");
HtmlAgilityPack.HtmlNodeCollection nodes = document.DocumentNode.SelectNodes("//*['sc:xslfile']");
有什么想法吗?
编辑:
HTML 看起来像这样:
<p>Men's Standings<br />
<sc:xslfile runat="server" datasource="/Global/Tables/1_01/9859_" id="WC_9859"></sc:xslfile>
<br /><br /><br />
Women's Standings
<br /><sc:xslfile runat="server" datasource="/Global/Tables/1_01/9860_" id="WC_9860"></sc:xslfile></p>
@Pat,我尝试了starts-with,但仍然不行。
也许是因为标签是空的?