Generate xpath to find sibling nodes between two elements The function produces a compounding xpath with each subsequent argument provided. Thus the final argument specified will be the node that is selected by the resulting xpath with the exception of nested_tag_contains which helps to identify a nested tag by its contents
xpath_sibling_between.RdGenerate xpath to find sibling nodes between two elements
The function produces a compounding xpath with each subsequent argument provided. Thus the final argument specified will be the node that is selected by the resulting xpath with the exception of nested_tag_contains which helps to identify a nested tag by its contents
Usage
xpath_sibling_between(
start_tag,
following_sibling,
preceding_sibling,
nested_tag,
nested_tag_contains
)Arguments
- start_tag
chrxpath of the upper bounding element- following_sibling
chrrelative xpath of the lower bounding element- preceding_sibling
chrrelative xpath for the type of elements in between the upper and lower bounding elements to retrieve- nested_tag
chrrelative xpath of an element nested within thepreceding_siblingelements- nested_tag_contains
chrof text that the nested_tag element contains (in order to identify it. The nested tag element itself will be selected).