How to select following sibling/xml tag using xpath
How to select following sibling/xml tag using xpath
To select the siblings xml tag using xpath use the given code below,
tr/td[@class='name']/following-sibling::td
Also use:
tr[td[@class='name'] ='Brand']/td[@class='desc']
This may estimetes that:
- The context node, against which the XPath expression is evaluated is the parent of all tr elements.
- Each tr element has only one td with class attribute valued ‘name’ and only one td with class attribute valued ‘desc’.
This could be an alternative for selecting the folowing siblings xml tag using xpath by the following-sibling axis (following-sibling::td).