Sydney Office
SYDNEY
I would start with a template like
which should more precisely match the element you want matched. As to how to select the adjacent
sibling element... why not use the following-sibling
XPath axis with the proper string?
...
...
...
BTW, this looks like an endless loop waiting to happen:
...
...
I am sure there are a few mistakes in my answer, but it should be helpful in some capacity anyway.