Selecting siblings between two nodes using XPath

I believe this XPath expression selects the nodes you want:

//table[@class="header_completed"]/
    following-sibling::table[@align="center"][1]/
        preceding-sibling::table[
            preceding-sibling::table[@class="header_completed"]
        ]

First I navigate to the table with @class="header_completed".

From there I select the first following sibling table with @align="center".

From there I select all preceding sibling tables that have a preceding sibling which is the table with @class="header_completed".

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)