I have piece of HTML like this:
I want to find all places where the
I am not sure that I understand you but there is my solution. This XPath matches ALL which are not followed by
directly. So There is test structure
- name
- name2
- value2
- name
- value
- name2
There is the XPath
//dt[ name( following-sibling::*[1] ) != 'dd' ]
or
//dt[ not( following-sibling::*[1]/self::dd ) ]
they do same thing