xpath: decipher this xpath? -
what xpath mean ? can decipher ?
//h1[following-sibling::*[1][self::b]]
select every h1
element (in document of context node) followed b
element (with no other intervening element, though there may intervening text).
breaking down:
//h1
select every h1
element descendant of root node of document contains context node;
[...]
filter out of these h1
elements don't meet following criteria:
[following-sibling::*[1]...]
such first following sibling element passes test:
[self::b]
self b
element. literally, last test means, "such when start context node , select self (i.e. context node) subject node test filters out except elements named b
, result non-empty node set."
Comments
Post a Comment