或、无属性、属性个数、属性值:
var preceding_siblings = node.SelectNodes("preceding-sibling::input| preceding-sibling::button[count(@role)>0] | preceding-sibling::div[not(@*)]");
var ancestors = node.SelectNodes("ancestor::div | ancestor:div[@level=‘primary‘] | ancestor::div/ul");
以全小写查找:
var content_venue_nodes = this.GetNodes("//div//text()[contains(translate(.,‘ABCDEFGHIJKLMNOPQRSTUVWXYZ‘,‘abcdefghijklmnopqrstuvwxyz‘),‘hello world‘)]");
......
时间: 2024-10-13 11:22:09