开发者

Xpath expression matching several attributes for HtmlAgilityPack

Assuming I want to find a table with certain width and height attributes No problem with

doc.DocumentNode.SelectSingleNode("//table[@width='500']"); 

Would it be possible to add height='500' someho开发者_Python百科w to this Xpath expression ?


with logical "and" operator:

doc.DocumentNode.SelectSingleNode("//table[@width='500' and @height='500']");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜